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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign macro to worksheet command button 2

Status
Not open for further replies.

willyboy58

Technical User
May 29, 2003
86
US


I am trying to assign a macro to a command button that I have added to a worksheet.

I open the Toolbox, click on the Command Button icon, then click on my worksheet to create the button. But when I right click the button to assign the macro, I do not get the choice of “Assign Macro”. I have a few other buttons on the same sheet where I was able to do it, but can’t figure out why it won’t on this one button.

What am I missing?

TIA

Bill
 
Hi
Sounds like you're used to creating buttons using the "Forms" toolbar but on this occasion it sonds like the buttons were created from the "Control Toolbox"

If this is the case make the Control Toolbox toolbar visible in the normal way and enter design mode by clicking the button that looks like a set square. Once you have done this you can then select the object and either click the "View Code" button (has a magnifying glass) or right click the object and choose View Code.

There isn't actually an assign macro option. These objects are event driven so if you already have code you will need to coopy it to the buttons' click event (shown by default from view code)

Alternatively this button is locked (format Control>protection) and the others aren't and the worksheet is protected? Actually more likely than all the rubbish I've given before!!!!

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Loomah,

"Sounds like you're used to creating buttons using the "Forms" toolbar but on this occasion it sonds like the buttons were created from the "Control Toolbox"".

I should have used the Forms and not the Control Toolbox. So simple.

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top