VBA – Create a Hyperlink Menu of Worksheets
Written by
Reviewed by
Create Hyperlink Index of All Worksheets in Workbook
Let’s take the Macro to List all Sheets in a Workbook one step further and create a hyperlinked menu for each sheet in a workbook. This is a great time saver for someone that has many sheets and is trying to make a menu of hyperlinks to each one manually.
To use the macro just replace the word Sheet1(it appears twice) in the code with the tab name where you would like the results. Make sure there isn’t any important information on the output tab because it clears the data their before writing to it. After the macro runs, a list of every sheet with a hyperlink to each sheet is created.
Sub ListSheets()
Dim ws As Worksheet
Dim x As Integer
x = 1
Sheets("Sheet1").Range("A:A").Clear
For Each ws In Worksheets
Sheets("Sheet1").Cells(x, 1).Select
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection, Address:="", SubAddress:= _
ws.Name & "!A1", TextToDisplay:=ws.Name
x = x + 1
Next ws
End Sub
VBA Coding Made Easy
Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!