LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Can one function get another's ParamArray?

Rick:

Thanks very much for reply.

I'm not sure how much better I can explain, but here goes:

Cell $A$1's formula is:

=x("abc",123,y(999),z(y(999)))

In VBA routine xx() (which is not a sheet function), what must I do to
get an array whose members are the params of x() living--granted, in
one big, undifferentiated string--in $A$1, namely the 4 strings "abc",
"123", "y(999)" and "z(y(999))"?

Excel knows how to do it because it does do it. It parses all those
commas and parens in a .Formula string to get x's params. It even
supports nesting (when a param is itself a function call).

The only thing is, x()'s ParamArray seems to be available only to code
lucky enough to reside in the tiny, gated community lying between the
statements "Function x(ParamArray Params())" and "End Function".

And, as you clearly say, that code ain't executing during your VBA
runtime. (Unless, as I said, there's some way to do a "calc" or
"simulated execute" on $A$1 to get its params.)

But just because x()'s *own* code isn't executing doesn't mean we
don't need those params elsewhere, at times.

So, does Excel publish its param-parsing intelligence?

It ought to. Because otherwise we poor programmers have to reverse-
engineer it.

Thanks.

***
 
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
CONDITIONAL FORMATTING FOR ONE CELL TO MATCH ANOTHER'S TEXT MomHudd Excel Discussion (Misc queries) 4 February 15th 10 02:46 AM
Er...tell me again why I can't pass ParamArray to a Function? [email protected] Excel Programming 4 February 24th 09 06:27 PM
Passing ParamArray to another function converts it to TWO dimensions. [email protected] Excel Programming 4 January 31st 08 03:35 PM
Help with paramarray Jeremy Excel Programming 1 January 8th 07 03:48 PM
Link the format of one cell to another's Fabiano Excel Worksheet Functions 1 December 6th 05 04:49 PM


All times are GMT +1. The time now is 04:14 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"