M
Maury Markowitz
I have two modules, production and testing. I have a menu bar with
buttons on it, which is populated in code like this:
Sub AddButton(barName As String, buttonName As String, commandName As
String)
Set newbutton = Application.CommandBars(barName).Controls.Add
(Type:=msoControlButton)
With newbutton
.OnAction = commandName
.Caption = buttonName
.Style = msoButtonCaption
.Visible = True
End With
End Sub
I am adding buttons to the bar like this:
Call AddButton("STAT", "Imply parameters", "testing.xla!Solve")
In spite of the name being fully qualified with the correct module
name, this button continues to call the version of Solve in
"production.xla". It's very annoying.
Any advice?
Maury
buttons on it, which is populated in code like this:
Sub AddButton(barName As String, buttonName As String, commandName As
String)
Set newbutton = Application.CommandBars(barName).Controls.Add
(Type:=msoControlButton)
With newbutton
.OnAction = commandName
.Caption = buttonName
.Style = msoButtonCaption
.Visible = True
End With
End Sub
I am adding buttons to the bar like this:
Call AddButton("STAT", "Imply parameters", "testing.xla!Solve")
In spite of the name being fully qualified with the correct module
name, this button continues to call the version of Solve in
"production.xla". It's very annoying.
Any advice?
Maury