View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default How do you use a button to launch a macro?

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

"FSt1" wrote:

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


"Jerry" wrote:

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?