Assigning Macro to Command Button; Help Please

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
 
B

Bob Phillips

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)
 
R

Ron de Bruin

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
 
M

Monte Comeau

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)
 
M

mjack003

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
 
B

Bob Phillips

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)
 
D

Dave Peterson

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
 
Top