Re: Help with writing macro

Andrew Douglas Pitonyak <[email protected]>
Newsgroups gmane.comp.openoffice.questions
Message-ID <[email protected]>
On 09/20/2011 04:48 PM, Grzesiek Sójka wrote:
> I need to write a macro accepting variable length parameter list. I 
> was tryint to googl but no luck. So the question is how to write 
> (preferably in OpenOffice Basic) macro accepting variable length 
> parameter list.
I am not aware of any way to write a macro that accepts an totally 
arbitrary number of parameters. That said:

*** (1)
You can specify as many arguments as you desire to be optional. The 
disadvantage is that you must then set an upper bound on the number of 
arguments, and then you must also test each argument to see if it was 
included.

*** (2)
When you call a macro as a function from Calc, ranges are packaged and 
sent as an array, which means that you require only a single variable 
for each range included. This may, or may not, be of use.

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php

-- 
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.