Excel Worksheet Tips: Creating Navigation Buttons

In a previous excel post, I explained how to create hyperlinks. Extending from this, you can link this ability with some simple VBA to create navigation buttons, similar to ones that you would find on websites.

1. Firstly, click on the developer tab.

2. Click on the “Insert” icon. Select “Command Button”.

3. In my introduction to VBA, I mentioned how to create a test macro to determine what code will perform the desired action. In this case, we will open up the second sheet in the workbook. This code is shown below:

Sub Macro1()


End Sub

This code is then assigned to the button that was created.

4. Right click on the button and select “view code”

5. Once you have clicked on the view code option, between the lines “Private Sub CommandButton1_Click()” and “End Sub” type the name of the macro that switches to sheet 2.

6. Click on the button and it should take you to the second page.

You can create buttons to do a vast array of tasks.

Come check out the directory for the rest of my excel tips!



Posted by:submeg

Musician, Writer and Inspirer. I discuss the projects I am working on, the services I provide and my general thoughts.

Tell me what you think!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s