View Single Post
 
Old 04-08-2014, 05:53 PM
macropod's Avatar
macropod macropod is online now Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,371
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Pecoflyer View Post
You can also create a sheet index as explained here.
This macro creates it in the same workbook, but if you Google around a bit I'm sure somebody has the second part of the answer
For the second part, simply use the following cut-down version of the macro, then copy the resulting index from column B to the other workbook:
Code:
Sub MakeLinks()
Dim wSheet As Worksheet, l As Long
l = 1
With Me
  .Columns(2).ClearContents
  .Cells(1, 2) = "INDEX"
  .Cells(1, 2).Name = "Index"
End With
For Each wSheet In Worksheets
  If wSheet.Name <> Me.Name Then
    l = l + 1
    Me.Hyperlinks.Add Anchor:=Me.Cells(l, 2), Address:=ThisWorkbook.FullName, _
    SubAddress:="Start_" & wSheet.Index, TextToDisplay:=wSheet.Name
  End If
Next wSheet
End Sub
Note the use of 'ThisWorkbook.FullName' to add what will be the destination workbook's name and that the 'Back to Index' hyperlink created via the macro in the link won't take you back to the originating workbook in this case. Personally, I'd rather add the forward & back buttons to the QAT than mess around putting a 'Back to Index' hyperlink on every worksheet.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote