E
ExcelMonkey
Thaknks Robin. Quick question. If I wanted to count the number o
dependents the cell has, how would I incorporate this into your code?
I am assuming that I would use a Count Method on the rngDep. But sinc
the code is simply creating a boolean ouput (TRUE/FALSE) I am assumin
that a count will only be 1 or 0. Any ideas? Thnks
Public Function HasInternalDependents(rngTest As Range) As Boolean
Dim rngCell As Range
Dim rngDep As Range
For Each rngCell In rngTest
Set rngDep = Nothing
On Error Resume Next
Set rngDep = rngCell.Dependents
On Error GoTo 0
If Not rngDep Is Nothing Then
HasInternalDependents = True
Exit Function
End If
Next rngCell
End Functio
dependents the cell has, how would I incorporate this into your code?
I am assuming that I would use a Count Method on the rngDep. But sinc
the code is simply creating a boolean ouput (TRUE/FALSE) I am assumin
that a count will only be 1 or 0. Any ideas? Thnks
Public Function HasInternalDependents(rngTest As Range) As Boolean
Dim rngCell As Range
Dim rngDep As Range
For Each rngCell In rngTest
Set rngDep = Nothing
On Error Resume Next
Set rngDep = rngCell.Dependents
On Error GoTo 0
If Not rngDep Is Nothing Then
HasInternalDependents = True
Exit Function
End If
Next rngCell
End Functio