Excel VBA to Navigate to Sheets

A shortcut menu makes it easy

If you right click the arrows on the left of the sheet tabs at the bottom, left of the Excel screen you can see a list of all the sheets in the file. You can use VBA to show this list anywhere.

The command to show this list is a one liner.

Sub ShowSheets()
 
Application.CommandBars("Workbook tabs").ShowPopup
 
End Sub

This list that displays allows you to navigate to any sheet in the file. Only visible sheets are listed.

You can assign this macro to a button, an image or an icon. You can even use a Quick Access Toolbar icon. See below for examples.

 

You can also add a keyboard shortcut – I used Ctrl + Shift + Q.

Press Alt + F8 and select the macro. Click the Options button and in the dialog that opens set up the keyboard shortcut.

Once created you can use the shortcut with a cell selected.

 

 

As you can see a simple line of VBA code offers fast navigation at the click of a button or the press of a keyboard shortcut.

 

Please note: I reserve the right to delete comments that are offensive or off-topic.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.