Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assigning a macro to a command button
I posted this question earlier today but I forgot to mention an important
item. The right click, assign macro choice is not available with the button I used (the command button on the control toolbox.) Here's the earlier post. I accidently used the wrong button and am hoping there is a fix. I need to run a macro from a button. I know that if I use the button (control button) from the forms toolbar the first thing it asks me to do is to assign a macro and all would work fine. But... I used the command button from the control toolbox to make the buttons (I made many of them and would prefer not to remake them). I would like to run a macro from each of these buttons and now I can't figure out how to attach the macro to the buttons I've already made. The buttons came from the command button on the control toolbox. Is there a way to attach a macro to these buttons?? THANKS ! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assigning a macro to a command button
Macros are "assigned" to those buttons in the SheetModule.........here's a
typical example........ Private Sub CommandButton1_Click() Call YourMacroName Sheets("Notes").Select Application.Goto Reference:="R500C1" Application.Goto Reference:="R72C1" MsgBox "Hey!....you just pushed my button!" End Sub hth Vaya con Dios, Chuck, CABGx3 "SheriTingle" wrote: I posted this question earlier today but I forgot to mention an important item. The right click, assign macro choice is not available with the button I used (the command button on the control toolbox.) Here's the earlier post. I accidently used the wrong button and am hoping there is a fix. I need to run a macro from a button. I know that if I use the button (control button) from the forms toolbar the first thing it asks me to do is to assign a macro and all would work fine. But... I used the command button from the control toolbox to make the buttons (I made many of them and would prefer not to remake them). I would like to run a macro from each of these buttons and now I can't figure out how to attach the macro to the buttons I've already made. The buttons came from the command button on the control toolbox. Is there a way to attach a macro to these buttons?? THANKS ! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
error when running cut & paste macro | Excel Worksheet Functions | |||
link to combobox | Excel Discussion (Misc queries) | |||
How to stop Excel remembering/loading macro from previously opened Workbook | Excel Discussion (Misc queries) | |||
Assigning macro to button | Excel Discussion (Misc queries) | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions |