How to Use Excel VBA
Visual Basic for Applications is a programming language developed by Microsoft. It is designed to be used with several Microsoft applications such as Excel, Word and Access. VBA is meant to integrate these programs through the use of scripts called macros. Excel can be programmed to pull data from these other applications, then manipulate it into a spreadsheet as needed.
Instructions
-
-
1
Go to the "View" menu and select "Forms" from the "Toolbars" section. This will open a new toolbar with several form objects that can be inserted for use with VBA macros.
-
2
Select the "Button" option, then drag an area over the spreadsheet where you want the button to be placed. When you place the button, a window will pop up with a list of macros that are available.
-
-
3
Select the macro you wish to assign to this button, then press the "OK" button. From now on, whenever you press this button, the assigned VBA macro will be run in Excel.
-
1
Tips & Warnings
More buttons can be added to run additional macros.
The menu options may be different in newer versions of Excel.
References
- Microsoft Support: How to assign a macro to an option button in Excel
- Mr Excel: Run a Macro from a Command Button
- Chris Le Roy; Business Trainer; Australia
- Photo Credit excel image by Christopher Hall from Fotolia.com