Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count Dependents
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UDF FOR DEPENDENTS | Excel Discussion (Misc queries) | |||
Dependents | Excel Programming | |||
Trace Dependents | Excel Programming | |||
Trace dependents | Excel Programming | |||
Dependents on another worksheet | Excel Programming |