Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a Macro
Can anybody tell me how to run a macro from a command
Button. Excel help says to select the button then right click and select Assign Macro from the shortcut menu, but the menu dosn't have such an option. I am running Excel XP |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a Macro
If you add a button using the Forms toolbar, then you can select a macro
through the shortcut menu. The macro would exist in a standard module. The button will have a default name like Button 1. If you add a button using the Controls Toolbox toolbar, then it has it's own code module, available through the shortcut module. VBA associated with this button needs to be in it's code module. The button will have a default name like CommandButton1. Keith wrote: Can anybody tell me how to run a macro from a command Button. Excel help says to select the button then right click and select Assign Macro from the shortcut menu, but the menu dosn't have such an option. I am running Excel XP |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a Macro
Hi
There is a difference, do you use a button from Control Toolbox or Forms Toolbar. For first, you select from dropdown menu 'View code' - an empty OnClick event is created, and you can edit it. With another, you are asked for procedure yo want the button to be assigned to, when you create button, but you can assign the procedure later too. But you must have a macro present in VBA module anyway - you can't assign non-existing macro to command button from Forms toolbar. -- Arvi Laanemets (Don't use my reply address - it's spam-trap) "Keith" wrote in message ... Can anybody tell me how to run a macro from a command Button. Excel help says to select the button then right click and select Assign Macro from the shortcut menu, but the menu dosn't have such an option. I am running Excel XP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disable running of SelectionChange macro when in another macro? | Excel Discussion (Misc queries) | |||
Event Macro running another macro inside | Excel Discussion (Misc queries) | |||
disable user running macro from Tools Macro | Excel Discussion (Misc queries) | |||
running a macro ina workbook that doesnt have that macro | Excel Programming | |||
Launch Macro in Access via Macro running in Excel??? | Excel Programming |