Thread
:
Count Dependents
View Single Post
#
2
Posted to microsoft.public.excel.programming
Die_Another_Day
external usenet poster
Posts: 644
Count Dependents
You don't need to in this case:
MsgBox Selection.Dependents.Count
Charles
wrote:
I want my Sub to count the number of cells that depend from the range
that is currently selected. I wrote the following code, but it does not
work. How can I set a range to be equal to the current selection?
Sub Test_Dependents()
Dim r As Range
Set r = ThisWorkbook.ActiveSheet.Selection
MsgBox (r.Dependents.Count)
End Sub
Thank you
Caezar
Reply With Quote
Die_Another_Day
View Public Profile
Find all posts by Die_Another_Day