Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have created a Macro to perform the task of taking the user from one
worksheet to another upon clicking the command button. However when right clicking on my mouse to view the short cut menu for the command button there is no option to assign a macro to the button? The options availabl to me are the format control at the bottom of the short cut menu. How do I activate a Macro on a command button?? |
#2
![]() |
|||
|
|||
![]()
You can assign macros in the way you want to buttons created from the
Forms toolbar. You've created a button from the Control Toolbox instead. You can use the button's _Click() event to call your macro: Sub CommandButton1_Click() MyMacro End Sub In article , "Mickey Blue Eyes" <Mickey Blue wrote: I have created a Macro to perform the task of taking the user from one worksheet to another upon clicking the command button. However when right clicking on my mouse to view the short cut menu for the command button there is no option to assign a macro to the button? The options availabl to me are the format control at the bottom of the short cut menu. How do I activate a Macro on a command button?? |
#3
![]() |
|||
|
|||
![]()
In disign mode,right click the button then select view
code. If you have already written the macro you can use the Call command to run it. sample code below. Private Sub CommandButton1_Click() Call YourMacro End Sub good luck -----Original Message----- I have created a Macro to perform the task of taking the user from one worksheet to another upon clicking the command button. However when right clicking on my mouse to view the short cut menu for the command button there is no option to assign a macro to the button? The options availabl to me are the format control at the bottom of the short cut menu. How do I activate a Macro on a command button?? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assign Macro | Excel Discussion (Misc queries) | |||
Destroy command button with a Macro? | Excel Discussion (Misc queries) | |||
Assign Macro to button in Excel doesnt work Any ideas? | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
assign a macro to a control button | Excel Discussion (Misc queries) |