PDA

View Full Version : [SLEEPER:] Remove "Search all menus" from my mouse menu I created.



majczja
11-11-2024, 02:59 PM
Hello!

Thank you soooo much if you help!!
How do I remove the "Search all menus" that appears st the top of the mouse richt-click meu?

I created a mouse menu using the following code (It wors fine):


Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Dim cBut As CommandBarButton
Set CellMenu = Application.CommandBars("Cell")
Do While CellMenu.Controls.Count > 0
CellMenu.Controls(1).Delete
Loop
On Error Resume Next
With Application
.CommandBars("Cell").Controls("clearThisCell").Delete
Set cBut = .CommandBars("Cell").Controls.Add(Temporary:=True)
End With
With cBut
.Caption = "Clear Contents"
.Style = msoButtonCaption
.OnAction = "clearThisCell"
End With
End Sub

Jan Karel Pieterse
11-12-2024, 06:28 AM
As far as I know, you cannot remove that control from the right-click cell menu.