Until now we have run all subroutines from the VBA Editor. To run a subroutine from the Worksheet, choose View -> Macros -> View Macros. In the Macro dialog box select the macro name (for us it is the subroutine name) and press Run. Below is a screenshot of the Macro dialog box.
We can also run a subroutine from a Worksheet button.
If necessary use Alt-F11 to bring up Worksheet Window. Choose Developer -> Insert -> Form Controls -> Button icon. Drag your cursor on Worksheet to create the size button you want. An Assign Macro dialog box will pop up. Choose which subroutine you want to run and click OK. Click outside the button to activate the button, and click on button to run the subroutine.
Note: If you run into a problem while running an application and your computer locks up, do the following.
Table of Contents
Ch1-Introduction
Ch2-Loops
Ch3-If Statements
Ch4-Functions
Ch5-Subs & Functions
Ch6-Read & Write
Ch7-Operators
Ch8-Built-in Functions
Ch9-Built-in Examples
Ch10-Debugging
Ch11-Running Subs
Ch12-Sample Programs
Ch13-WS Formulas
Ch14-Questions