Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you use a button to launch a macro?
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you use a button to launch a macro?
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you use a button to launch a macro?
Take a look at this:
http://www.anthony-vba.kefra.com/vba/vbabasic1.htm Regards, Ryan--- -- RyGuy "FSt1" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Launch MS Access DB from a button in Excel | Excel Programming | |||
How do I launch my macro by button? | Excel Programming | |||
Is it possible to make a Button on a tool bar to launch an Add-in | Excel Discussion (Misc queries) | |||
Macro launch - Button vs Manual launch , has different results. | Excel Programming | |||
button to launch my userform | Excel Programming |