Attribute VB_Name = "TableOfContents" ' Crea una hoja "Índice" con un hipervínculo a cada hoja del libro. Sub CreateTableOfContents() Dim ws As Worksheet, toc As Worksheet, i As Long On Error Resume Next Application.DisplayAlerts = False ThisWorkbook.Sheets("Índice").Delete Application.DisplayAlerts = True On Error GoTo 0 Set toc = ThisWorkbook.Sheets.Add(Before:=ThisWorkbook.Sheets(1)) toc.Name = "Índice" toc.Range("A1").Value = "Índice de Hojas" toc.Range("A1").Font.Bold = True i = 3 For Each ws In ThisWorkbook.Worksheets If ws.Name <> "Índice" Then toc.Hyperlinks.Add Anchor:=toc.Cells(i, 1), Address:="", _ SubAddress:="'" & ws.Name & "'!A1", TextToDisplay:=ws.Name i = i + 1 End If Next ws End Sub