Attaching a macro (module) code to button

T

Todd Huttenstine

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, Before:=11
 
R

Rob van Gelder

You're looking for the OnAction property.

You can do a help search for commandbar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top