Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Checking cell for Dependents


I was hoping that there would be dependent properties that I could test
TRUE or FALSE. It looks as though the examples you have are methods.
Is it possible to test the method to see if it fails. That is if i
you go

cell.dependents.select

and there are not any dependents will the code fail. If so, can I tra
the error and pass this to a TRUE FALSE variable.

Thanks

R

--
ExcelMonke
-----------------------------------------------------------------------
ExcelMonkey's Profile: http://www.excelforum.com/member.php...nfo&userid=522
View this thread: http://www.excelforum.com/showthread.php?threadid=27618

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Checking cell for Dependents

Doing this reliably is not trivial since the dependents property only works
for cells on the same sheet as the original. If you want it to be exhaustive
you also have to use the showdependents method and navigate method, then use
an error trap to see if a dependent exists in another sheet. If you want an
exhaustive suite of dependent, precedent and circularity testing tools, you
could check out my XspandXL add on my site. For the time being, this will
tell you if a range of one or more cells has any internal dependents.

Public Function HasInternalDependents(rngTest As Range) As Boolean
Dim rngCell As Range
Dim rngDep As Range

For Each rngCell In rngTest
Set rngDep = Nothing
On Error Resume Next
Set rngDep = rngCell.Dependents
On Error GoTo 0
If Not rngDep Is Nothing Then
HasInternalDependents = True
Exit Function
End If
Next rngCell
End Function

Robin Hammond
www.enhanceddatasystems.com


"ExcelMonkey" wrote in message
...

I was hoping that there would be dependent properties that I could test,
TRUE or FALSE. It looks as though the examples you have are methods.
Is it possible to test the method to see if it fails. That is if if
you go

cell.dependents.select

and there are not any dependents will the code fail. If so, can I trap
the error and pass this to a TRUE FALSE variable.

Thanks

RK


--
ExcelMonkey
------------------------------------------------------------------------
ExcelMonkey's Profile:
http://www.excelforum.com/member.php...fo&userid=5221
View this thread: http://www.excelforum.com/showthread...hreadid=276188



Reply
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
Trace dependents for multiple cell mk Excel Discussion (Misc queries) 2 February 12th 08 03:37 PM
How do you ID cell precendents/dependents in other sheets? [email protected] New Users to Excel 2 October 4th 07 09:31 AM
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Trace Precedents and dependents for a range of cell ? Anand vijay New Users to Excel 1 January 17th 07 08:02 PM
How to trace dependents in a book at once without checking cell by alisfalor Links and Linking in Excel 2 March 11th 05 07:53 AM


All times are GMT +1. The time now is 03:52 AM.

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"