Reversing from a Hyper link

  • Thread starter Thread starter Jackflash21
  • Start date Start date
J

Jackflash21

I am working on a fairly complex work book and it requires over 100 tabs.

The issue is when I make the jump via a hyperlink to a central information
sheet and want to get back to the tab I came from.

Any ideas how to make a "Back" button, so I can simply go back to the tab
where I came from?
 
Can't you just place another hyperlink in there that references the sheet
that you came from?

Ryan---
 
That will work, but before making the jump to the master sheet, reset the
pointer for the "Return to Last Worksheet" hyperlink to the current
worksheet. That way it will always point to the last tab you were on before
going to the master.

Eric
 
Lightly tested....

Tim

'*************************************
'In the "ThisWorkbook" module
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target
As Hyperlink)

Dim backRef As String
If Target.TextToDisplay <> "Back" Then 'only if not a "back" link
backRef = "'" & Sh.Name & "'!" & Target.Range.Address(False, False)
' Debug.Print backRef
'adjust the "back" hyperlink to point to the link just clicked
ThisWorkbook.Sheets("MainInfo").Range("B5").Hyperlinks(1).SubAddress
= backRef
End If

End Sub
'*************************************
 
Back
Top