View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default .Parameter property of CommandBarButton

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

"Gregory Kip" skrev i melding
...
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