Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ActiveCell.Dependents kills code

7 views
Skip to first unread message

Ritchie@discussions.microsoft.com Duncan Ritchie

unread,
Mar 13, 2008, 2:51:00 AM3/13/08
to
I have been trying to get a .net application to use the .Dependents property
of the activecell. It works perfectly if there are dependents however if the
cell has no dependents then the code stops executing - no errors, no way to
catch etc.

I have tried with VB and C#. I also tried the same thing in VBA and get a
run time error 1004 - Application-defined or object-defined error.

The issue is that there doesn't seem to be a way to find out if a cell has
dependents.


C# code Excel.Range r = this.Application.ActiveCell.Dependents;
VB Code If (Me.Application.ActiveCell.Dependents IsNot Nothing)
Then

Any ideas on how I can get past this error or if there is another way to
find out if a cell has dependents before calling this property.

Thanks


Duncan

0 new messages