LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,059
Default How to traverse cell.Dependents

First, I am surprised the following alone does not work when there are
no dependents:

dim dep as Range
for each dep in cell.Dependents
[....]
next dep

Normally, the For statement works just fine when it has nothing to do.

But okay, the above produces an error when there are no dependents
("no cells were found").

So what do I test to prevent the error? I thought:

if cell.Dependents.Count 0 then
for each dep in cell.Dependents
[...]
next dep
end if

But that does not work. I also tried IsNull() and IsEmpty(), to no
avail.

So, what's the correct magic incantation to use?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
survey traverse computations SRH Excel Discussion (Misc queries) 0 February 27th 10 01:54 AM
traverse data based on 2 conditions olga Excel Discussion (Misc queries) 5 January 9th 07 04:12 PM
traverse until non integer evil baby[_6_] Excel Programming 1 March 1st 06 04:00 PM
Checking cell for Dependents ExcelMonkey[_185_] Excel Programming 1 November 13th 04 09:20 PM
Traverse treeview bottom to top RB Smissaert Excel Programming 2 August 23rd 03 07:34 PM


All times are GMT +1. The time now is 11:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"