VBA code to create index of links to sheets

Some time it is very difficult to move from one sheet to other sheet using short cut keys or manually.

The following VBA code may help you to create indexes of sheet names.

Please do as follows:

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA CODE TO CREATE INDEX OF LINKS TO SHEETS

Sub CreateLinksToAllSheets()
Dim sh As Worksheet
Dim cell As Range
For Each sh In ActiveWorkbook.Worksheets
If ActiveSheet.Name <> sh.Name Then
ActiveCell.Hyperlinks.Add Anchor:=Selection, Address:=””, SubAddress:= _
“‘” & sh.Name & “‘” & “!A1”, TextToDisplay:=sh.Name
ActiveCell.Offset(1, 0).Select
End If
Next sh
End Sub