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
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