Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Going Crazy. I create a Command Button and cannot assign a macro

Status
Not open for further replies.

RyanScharfy

Technical User
Jun 17, 2003
86
US
This borders on embarrassing as I think I'm having an Alzheimer's attack. I don't know what the variable is, but today I just cannot assing a Macro to a Command Button. I've done it before.

I create a Command Button, I right click so I can assign a macro, and I get the same old Cut, Copy, Paste, Properties, View Code, Command Button Object, Grouping, Order, Format Control menus.

And yes, I do have a macro save and ready to assign. :)

I'm using Microsoft Excel 2000, and my
Macro security is set to Medium.

Thanks for any tips.
 
Hi,

If you are using Control Toolbox Toolbar, if you double click the Command Button in the Edit mode, it will take you to the VB Editor in the CommandButton1_Click event.

If you are using the Forms Toolbar, when you insert a Button, it will display the Assign Macro window. ALternatively, you can not assign a macro immediately and later right click on the Button and select Assign Macro.

Hope this helps :)

Skip,
Skip@TheOfficeExperts.com
 
Ryan,
If you create a button from the Control Toolbox Menu, you can't assign a macro, you have to 'View Code'...

But if you create a button from the 'Forms' toolbar, then you can assign a macro. There's more than one way (almost always)...

"It's more like it is now, than it ever has been."
 
If you go through Tools - Customize - Commands - Macros and drag the custom button onto a toolbar you have to keep the Customize box open and then right clicking on the button will bring the menu with the Assign Macro option. If you close the customize box you will not get this menu.
 
Thanks to all who responded, sure enough, that worked. Due to some glitch a few days ago, I lost all my non-default toolbars, and sure enough, I replaced "Forms" with the "Control Toolbox".

Thank you all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top