Sorry, that doesn't answer your question at all, will look later
Regards,
Peter T
"Peter T" <peter_t@discussions> wrote in message
news:%(E-Mail Removed)...
> Hi Kris,
>
> Sub Test()
> Dim cel As Range, ar As Range
> Dim rDeps As Range, rDirDeps As Range, rDirPrecs As Range
>
> Set cel = Range("B2")
>
> On Error Resume Next
> Set rDeps = cel.Dependents
> Set rDirDeps = cel.DirectDependents
> Set rDirPrecs = cel.DirectPrecedents
> On Error GoTo 0
>
> If Not rDeps Is Nothing Then
> For Each ar In rDeps.Areas
> Debug.Print ar.Address
> For Each c In ar.Cells
> Debug.Print , c.Address
> Next
> Next
> End If
> If Not rDirDeps Is Nothing Then
> For Each ar In rDirDeps.Areas
> Debug.Print ar.Address
> For Each c In ar.Cells
> Debug.Print , c.Address
> Next
> Next
> End If
>
> If Not rDirPrecs Is Nothing Then
> For Each ar In rDirPrecs.Areas
> Debug.Print ar.Address
> For Each c In ar.Cells
> Debug.Print , c.Address
> Next
> Next
> End If
>
> End Sub
>
> Regards,
> Peter T
>
>
> "kris" <(E-Mail Removed)> wrote in message
> news:BD1CC184-4618-4046-9D47-(E-Mail Removed)...
> > Hi, Kris here
> > I want to know how to determine wheather a cell in a worksheet has got
> > reference to other workshhet or reference in the same worksheet.
> >
> > Thanks
>
>
|