R
Rudy
I use a menu in Word to activate a macro. I try to build each menu
voice that onaction call a macro with a different parameter values,
but it seems that it's not correct, the example is like:
Set myMenuBar = CommandBars.ActiveMenuBar
Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
newMenu.Caption = "ciao"
Set ctrl1 = newMenu.Controls _
.Add(Type:=msoControlButton, ID:=1, Before:=1 + i)
ctrl1.Caption = "ciao1"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "'activatemacro 10'"
voice that onaction call a macro with a different parameter values,
but it seems that it's not correct, the example is like:
Set myMenuBar = CommandBars.ActiveMenuBar
Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
newMenu.Caption = "ciao"
Set ctrl1 = newMenu.Controls _
.Add(Type:=msoControlButton, ID:=1, Before:=1 + i)
ctrl1.Caption = "ciao1"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "'activatemacro 10'"