View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Attaching a macro (module) code to button

You're looking for the OnAction property.

You can do a help search for commandbar.


"Todd Huttenstine" wrote in message
...
Below is a code that creates a button on the Worksheet
menu bar. But how do I programmatically assign
module "createbutton" to it?

Also where can I find more info about programmaticaly
creating buttons on Excel Toolbars?

Thanx
Todd Huttenstine

Application.CommandBars("Worksheet Menu Bar").Controls.Add
Type:= _
msoControlButton, ID:=2950, Befo=11