.Parameter property of CommandBarButton

  • Thread starter Thread starter Gregory Kip
  • Start date Start date
G

Gregory Kip

Hello,

Running Excel 2000 I dynamically create a command bar button but cannot
seem to make its .Parameter property work.

Set myCBB = CommandBars("Standard").Add (etc...)

with myCBB
.Parameter = "Macro ""<Module_Name>.<Sub_Name>"""
end with

I run this code and then click the button and the "Assign Macro" dialog
box appears. Please help!

-Greg
 
Hi Greg

Sounds like you want the .OnAction property, not the .Parameter.

with myCBB
.OnAction = Module_Name.Sub_Name
end with

HTH. Best wishes Harald
 
Tried it and it works. I am baffled, though, because I've been using
..Parameter in MSProject 2003. Maybe an update or something. Thanks again!
 
Back
Top