How do you use a button to launch a macro?

J

Jerry

Using a button and not an object, I want to launch Macro 1 if the Button 1 is
clicked on by the user, and I want to launch Macro 2 if Button 2 is clicked.
I want to use button controls so the button is marked when selected. Can
anyone help?
 
F

FSt1

hi
first..what are you calling a button? an icon on the toobar?? or a command
button from the control toolbox? or a command button from the forms toolbox?
what version of excel are you using????
assuming that you have already written the maco and are using 2003 or
earlier....
icon...
right click any toolbar. right click the icon. click assing macro. follow
the wizzard.
control toolbox...
in design mode. right click the button. from the popup, click view code.
paste the macro there or....
Private Sub CommandButton1_Click()
Call mymacro
End Sub
forms tool box.(not recomended if not on a form).....
from the assing macro dialog, select your macro..click ok.

post back if i missed something.
regards
FSt1
 
F

FSt1

hi
it's 1:30 am in atlanta. i'm about to crash. if you do post back, i'll have
a look at it tomorrow.

regards
FSt1
 

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