Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a menu item added to the Tools menu called MyMenu. I'm trying to tie
it to a VBA subroutine I've written called MySub. I have this code for the menu. Application.CommandBars("Worksheet menu bar").Controls("Tools").Controls.Add(Type:=msoCont rolButton).Caption = "MyMenu" Application.CommandBars("Worksheet menu bar").Controls("Tools").Controls("MyMenu").OnActio n = MySub Then I created a new module with this code. Private Sub MySub () MsgBox ("My subroutine") End Sub When I select the MyMenu command from the Tools menu, nothing happens so I'm obviously not making the linkage correctly. Any help would be greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Triggering an action when an item is selected from a dropdown menu | Excel Worksheet Functions | |||
Command button to move completed action item | Excel Discussion (Misc queries) | |||
Action Item Worksheet Creation | Excel Worksheet Functions | |||
Trigger Action when Standard Menu Item Selected? | Excel Discussion (Misc queries) | |||
Menu Item Action Changes with "User" accessing file | Excel Programming |