Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hello.
I have this code: Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) Application.CommandBars("Cell").Reset For Each Worksheet In Application.Worksheets With Application.CommandBars("Cell").Controls With .Add .Caption = Worksheet.Name .OnAction = "someMacro" .Tag = "someTag" .BeginGroup = True End With End With Next End Sub It adds all sheets in the context menu. There is just one more thing to be done. When you click on a sheet from the context menu, it must became active. Something like .OnAction = Worksheet.Select or a separate macro .... I am not sure how to do it so i need some advice. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing several parameters to OnAction property. | Excel Discussion (Misc queries) | |||
OnAction of Menu Bar with variable parameters | Excel Discussion (Misc queries) | |||
Timing problem with OnAction! | Charts and Charting in Excel | |||
passing arguments from an excel macro to a word macro | Excel Discussion (Misc queries) | |||
.ONACTION macro call fails | Excel Discussion (Misc queries) |