Teresa,
This is a very cut down extract from one of a series of complex tracing
routines you can find in my XspandXL add in on my site.
Have a look at the Tracing and Auditing section here:
http://www.enhanceddatasystems.com/ED/Pages/XspandXLAdditional.htm
To trace dependents on another sheet you need to use the following
technique. As I've produced it here, this only tests a single cell. You also
need to watch out that the dependents are not in hidden sheets, since Excel
will not follow the link to something hidden.
Sub Externals()
Dim rngTest as Range
Dim nLinkNumber as Integer
Dim shThisSheet as Worksheet
'show arrows which may or may not have external links
set rngTest = ActiveCell
'excel raises an error if there are no dependents so trap it
On Error Goto NoMoreLinks
rngTest.ShowDependents nLinkNumber = 1
On Error Goto 0
nLinkNumber = 1
Set shThisSheet = ActiveSheet
Do
'if there are no more links excel raises an error
On Error GoTo NoMoreLinks
rngTest.NavigateArrow TowardPrecedent:=False, ArrowNumber:=1,
LinkNumber:=nLinkNumber
On Error GoTo 0
'if you find the original cell there are no externals
If ActiveCell Is rngTest Then Exit Do
If Not ActiveCell.Parent Is shThisSheet Then
'you have found an external dependent
End If
nLinkNumber = nLinkNumber + 1
Loop
EndRoutine:
Exit Sub
NoMoreLinks:
On Error GoTo 0
Resume EndRoutine
End Sub
Robin Hammond
www.enhanceddatasystems.com