I found some code that works very nicely for navigating from one worksheet to another. The first worksheet has hyperlinks to the other worksheets, and all of the other worksheets have a hyperlink back to the first sheet. When a new worksheet is added to the workbook, the new sheet is automatically listed in alphabetical order on the first sheet. Works great.
Except, if I want to copy an amount from one sheet to the other, the edit/paste functionality does not work if I rely on the hyperlink for navigation. I can copy data from one sheet to another, but I can't figure out why this functionality does not work if I use the hyperlink navigation.
Is there something that I can do revise the code below?
Many thanks if someone can answer this for me.
Except, if I want to copy an amount from one sheet to the other, the edit/paste functionality does not work if I rely on the hyperlink for navigation. I can copy data from one sheet to another, but I can't figure out why this functionality does not work if I use the hyperlink navigation.
Is there something that I can do revise the code below?
Code:
Option Explicit
Private Sub Worksheet_Activate()
ActiveWindow.DisplayGridlines = False
Dim wSheet As Worksheet
Dim l As Long
l = 1
With Me
.Columns(1).ClearContents
.Cells(1, 1) = "List of Worksheet Tabs"
.Cells(1, 1).Name = "Index"
End With
For Each wSheet In Worksheets
If wSheet.Name <> Me.Name Then
l = l + 1
With wSheet
.Range("A1").Name = "Start_" & wSheet.Index
.Hyperlinks.Add Anchor:=.Range("A1"), Address:="", _
SubAddress:="Index", TextToDisplay:="Back to List of Worksheet Tabs"
End With
Me.Hyperlinks.Add Anchor:=Me.Cells(l, 1), Address:="", _
SubAddress:="Start_" & wSheet.Index, TextToDisplay:=wSheet.Name
End If
Next wSheet
End Sub
Many thanks if someone can answer this for me.
Last edited by a moderator: