![]() |
DirectDependents not working properly.
I am having extreme difficulty determining if a cell has dependents:
Function CellA1HasDependents() Dim R As Range Set R = Range("MySheet!A1").DirectDependents if R Is Nothing then ... Whether another cell (on MySheet) refers to A1 or NOT, R is always Not Nothing. What am I doing wrong? Thanks. *** |
DirectDependents not working properly.
My difficulties and confusion increase, not decrease.
If A1 has 1+ dependents, then if in the VBE Immediate window I type Range("MySheet!A1").DirectDependents.Count, I get a correct answer. But: 1) If A1 has no dependents, then the expression throws an error (1004) instead of answering "0". Why? 2) When the same expression is used in my FUNCTION, then, whether A1 has dependents or not, it a) always produces spurious value 1, and b) never throws an error. What is all this illogical behavior? Thanks. *** |
All times are GMT +1. The time now is 05:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com