In this video, you will learn how to Create Table of Contents with Hyperlinks with the help of VBA Macro Code.
Sub Getting_Worksheets_Names()
For i = 1 To ThisWorkbook.Worksheets.Count
Sheet16.Range("b" & i + 3).Value = Sheets(i).Name
Sheet16.Range("b" & i + 3).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, _
Address:="", SubAddress:=Range("b" & i + 3).Value & "!A1"
Next i
End Sub