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: 100
Default Finding external cell dependents works in a Sub() but not a UDF.

In Excel 2002 SP 3, I need a UDF that displays a concatenated string
of the texts of the external dependents of a given cell.

So if say Sheet1!A1 has 3 external dependents--Sheet2!A1 (text “cat”),
Sheet2!A2 (“dog”) and Sheet3!A1 (“bird”), then formula “=MyUDF(Sheet1!
A1)” should return “catdogbird”.

But I find no posts using .NavigateArrows in a Function(). All
examples are Sub()’s. True to that, this code:

Do
Set D = .NavigateArrow(False, 1, i)
If Not (D.Worksheet Is SourceRange.Worksheet) Then
Result = Result & D.Text
End If
i = i + 1
Loop Until <Whatever

works perfectly for me (cycles thru all externals) in a Sub(), but
fails in a Function().

Can it therefore not be done in a UDF?

If not, do any of you Knights of the Web have a workaround?

Thanks very much.

***

[P.S. The first post on:

http://groups.google.com/group/micro...ba3a450db971a2

intriguingly is in a Function(). But it self-defeats because its first
line:

If TypeOf Application.Caller Is Range Then GoTo theExit

is always true (at least for me), hence his code never executes. And
anyway, he uses the same .NavigateArrows logic as above, and if you
comment out the above line it fails as expected.]

***
 
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
How to traverse cell.Dependents joeu2004 Excel Programming 4 February 15th 08 12:10 PM
external data works in 2003 not in 2000 mikeolson Excel Programming 2 March 13th 07 01:14 PM
External link only works for numbers -- for text values, #N/A is displayed unless linked file is open Sven Filter Links and Linking in Excel 1 February 22nd 05 08:10 AM
Checking cell for Dependents ExcelMonkey[_188_] Excel Programming 1 November 15th 04 01:11 PM
Checking cell for Dependents ExcelMonkey[_187_] Excel Programming 1 November 14th 04 11:33 AM


All times are GMT +1. The time now is 02:50 AM.

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

About Us

"It's about Microsoft Excel"