Hello Ecoich,
Yes, you can. First copy the macro code below. Instructions follow on how to place the macro into a module. Next you need to add a command button to the Worksheet.
Adding Buttons to the Worksheet
- Click View on the Excel Menu Bar or use ALT+V.
- Click Toolbars or type T to display the available toolbars.
- Click on Forms or use the Down Arrow to select this toolbar.
- Look for the rectangular icon. When you place the mouse on it you will see Button displayed.
- Click on this icon.
- Move the cursor to the cell where you want the button. Left Click and Hold the button down while you move the mouse. This will draw the button. Release the button when you are done.
- A dialog box will appear asking you to assign a macro. Close the dialog. The macro will be added later.
- Repeat steps from 4 on to add more buttons.
Macro Code
Sub Calculate()
Application.Calculate
End Sub
Adding the Macro to the Workbook
1. Copy the macro above pressing the keys CTRL+C
2. Open your workbook
3. Press the keys ALT+F11 to open the Visual Basic Editor
4. Press the keys ALT+I to activate the Insert menu
5. Press M to insert a Standard Module
6. Paste the code by pressing the keys CTRL+V
7. Make any custom changes to the macro if needed at this time
8. Save the Macro by pressing the keys CTRL+S
9. Press the keys ALT+Q to exit the Editor, and return to Excel
Assign the Macro to a Button
1. Right Click on the Button you wish to assign a macro to.
2. From the pop up menu, Click on Assign Macro...
3. A dialog box will appear with a list of macros. Select Calculate from the list, and Click OK.
4. Press CTRL+S to save the changes
Your finished!
Sincerely,
Leith Ross
Bookmarks