Adding history to link follower

Saqib Husain, Syed
Saqib Husain, Syed used Ask the Experts™
I had this question appropriately answered. Macro to follow links.

Can someone modify this to track a history so that If I go a few files deep into tracking the links I can retrack back to the original cell?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

pls try in a normal module

Sub GoTowards()
    If Breadcrumbs Is Nothing Then
    Set Breadcrumbs = New clsBreadcrumbs
    End If
    Set OrigRng = ActiveCell
    Breadcrumbs.Add ActiveCell
    For Each varLink In ActiveWorkbook.LinkSources(xlExcelLinks)
        If InStr(1, Replace(OrigRng.Formula, "[", ""), varLink) > 0 Then
                Workbooks.Open varLink
        End If
    Next varLink
    OrigRng.NavigateArrow TowardPrecedent:=True, ArrowNumber:=1, LinkNumber:=1
    On Error Resume Next
    On Error GoTo 0
End Sub
Sub GoBack()
    If Breadcrumbs.Count > 0 Then
        Set OrigRng = Breadcrumbs.Item(Breadcrumbs.Count).rng
        Breadcrumbs.Remove Breadcrumbs.Count
    End If
End Sub

Open in new window

in class module named clsBreadCrumb
Public rng As Range

Open in new window

in a class module named cls Breadcrumbs
Public Breadcrumbs As New Collection
Sub Add(myrng As Range)
Dim b As New clsBreadcrumb
Set b.rng = myrng
Breadcrumbs.Add b
End Sub
Property Get Count() As Long
Count = Breadcrumbs.Count
End Property
Property Get Item(NameOrNumber As Variant) As clsBreadcrumb
Set Item = Breadcrumbs(NameOrNumber)
End Property
Sub Remove(NameOrNumber As Variant)
Breadcrumbs.Remove NameOrNumber
End Sub

Open in new window

Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

I've requested that this question be closed as follows:

Accepted answer: 500 points for Rgonzo1971's comment #a41526915

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial