Sub CreateLinks()
Dim rgLinks As range
Set rgLinks = range("C1")
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.name <> rgLinks.Parent.name Then
rgLinks.Hyperlinks.add rgLinks, ThisWorkbook.name, _
"'" & ws.name & "'!A1", ws.name, ws.name
Set rgLinks = rgLinks.Offset(1, 0)
End If
Next
Set ws = Nothing
End Sub
|