Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command button to run a macro
How can I use VBA to assign a command button to run a specific macro.
Please help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command button to run a macro
On an excel worksheet, Click on Tools -Customize -on Toolbars Tab -
Click Visual Basic - this will bring out a VB design window. - On VB design window, bring your cursor on design mode and click it. you are now on design mode. - Still on VB design window, bring your cursor on Control Toolbox and click it, - this will out a control toolbox window that contains several objects such as button, listbox, etc. - Click on Commandbutton and position your cursor where you want to put the button. - Right click the button( you are still on design mode) and click on View code. This will open the VB Window where you can enter your code. Enter your code where the cursor is blinking. ( Right click on the button to change it Properties such as its label, color...) Get out of design mode by clicking on Design Mode on the visual basic window( it should still be showing on the window where you enter your code. To check your work, go to the excel worksheet and click on the button. Let me know if this helps... Steve CY wrote: How can I use VBA to assign a command button to run a specific macro. Please help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Command button macro | Excel Discussion (Misc queries) | |||
Run a macro using a command button | Excel Discussion (Misc queries) | |||
Command Button to run a Macro | Excel Worksheet Functions | |||
Command Button & Macro | Excel Programming | |||
Macro for command button | Excel Programming |