Wednesday, 03 July 2019 22:58

How to Create an Excel Macro Button

Written by
Rate this item
(1 Vote)

Create a button in Excel to move the user to another worksheet

It is actually fairly easy to create a button on a worksheet that you can click to take you to another sheet in the workbook. It is a fun way to get started with macros in Excel if you have never made one before.

To do this, first check that the Developer tab is visible.  If not at the top with your other menus you will need to display it via the File menu.  Select Options and Customize Ribbon in the left hand menu and check the Developer option in the right hand pane. Click OK to exit. 

Then decide which sheet will contain the button and which sheet you will select when you click, the button. We’ll add a button to Sheet1 to take us to Sheet3.

  1. So click somewhere in Sheet1 and, from the Developer tab on the Ribbon, choose Record Macro.
  2. You need to give the macro a name that will identify later as the correct macro so in this case type GoToSheet3 in the Name box.  Macro names must be all one word with no spaces. 
  3. From the Store Macro in List choose to Store the macro in This Workbook and click OK.

Recording your macro

Excel is now in 'Record Mode' so only select the Sheet3 sheet tab click the Stop Recording button on the Developer menu.

Now we need to add a button to Sheet1 that will run the macro.

  1. Return to Sheet1 by selecting the Sheet1 tab and from the Developer menu, select the Insert option and click the Button (Form Control) option at the top of the drop down list. You must choose the Form Controls button and not the Active X Controls button.
  2. Drag the button onto the worksheet and when the Assign Macro dialog appears, click the GoToSheet3 macro and click OK.
  3. Select the text on the button and type Click to go to Sheet3.
  4. Click outside the button to deselect it and test it by clicking on the button to see it at work. When you click it you will be taken automatically to Sheet3.

If you need to make changes to the text on the button right-click on it to get access to the text. You can’t click it to select it because clicking it runs the macro attached to it.

Read 3903 times Last modified on Wednesday, 03 July 2019 23:28

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.