Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In a module of a xla:
Sub Create_DCA_Menu() Dim mynewbar, button1, button2, button3 Set mynewbar = CommandBars(1).Controls.Add(Type:=msoControlPopup, Temporary:=True) With mynewbar .Caption = "DCA Menu" End With Set button1 = mynewbar.Controls.Add(Type:=msoControlButton) With button1 .Caption = "Open Menu" .OnAction = ThisWorkbook.Name & "!Open_Menu" End With End Sub When I select the command bar button1 it tries to run "Open_Menu" in a different xla. I have multiple XLA files at different versions and they all have this same Sub. Even though I specified ThisWorkbook.Name it still goes to the other xla. What am I doing wrong? -- Trefor |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CommandBar problem - Question | Excel Programming | |||
Calling excel macro from VB 6 app problem | Excel Programming | |||
Add msocontrolbutton to commandbar problem | Excel Programming | |||
commandbar - rollout problem | Excel Programming | |||
problem with selection when calling macro externally from VB6 | Excel Programming |