Assigning Macro to Command Button; Help Please

  • Thread starter Thread starter Monte Comeau
  • Start date Start date
M

Monte Comeau

I cannot seem to assign a macro to a command button.

I select the button, right click on the resizing buttons (like the help file
told me to) but on the shortcut menu there is not a "Assign Macro" option
like there is supposed to be.

Any ideas?

Thanks
 
Monte,

Have you used the command button on the Forms toolbar, or the Control
toolbox toolbar? If the latter, then it doesn't have assigned macros, but
click events.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Monte
I select the button, right click on the resizing buttons (like the help file
told me to) but on the shortcut menu there is not a "Assign Macro" option
like there is supposed to be.

This is only when you use a button from the Forms toolbar

I think you use a button from the Controltoolbox
Go in the Edit mode and DBLClick on the button to enter your
macro name in the Click event of the button
 
Thanks...this is complicated ;)


Bob Phillips said:
Monte,

Have you used the command button on the Forms toolbar, or the Control
toolbox toolbar? If the latter, then it doesn't have assigned macros, but
click events.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi,

While on the subject of command buttons...how would you make the sam
command button appear on every sheet of a workbook ...and when a shee
is copied....not copy the command button? Any ideas would be great.

Regards,
Mjac
 
Put it in a toolbar.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
You could copy the sheet and remove the button (and if it's a commandbutton from
the control toolbox toolbar, you'd want to remove the underlying code, too).

Chip Pearson has nice notes for modifying code at:
http://www.cpearson.com/excel/vbe.htm

Or if you used a button from the forms toolbar, you could just remove the button
itself. You probably wouldn't want to kill the code--since it's still
associated with "good" buttons.

Or you could just insert a new sheet and copy the cells and paste them. And
leave all the objects behind!

Ron de Bruin has some sample code for this at:
http://www.rondebruin.nl/sendmail.htm
 

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

Back
Top