Test for empty array is 'UBound(AName) > -1'.

B

baobob

For any newish-bies out there:

I just discovered that, at least in this context, the inline test to
determine whether the user passed any arguments or not is:

function MyFunc(ParamArray MyArgs)
if UBound(MyArgs) > -1 then
<...>
else
MyFunc = "Eh, paisan, you wanna passa me an argument?"
endif
 
J

joel

See VBA Help

Understanding Named and Optional Arguments


You need to use the ISMISSING statement

if Not Ismissing(MyArgs)
<...>
else
MyFunc = "Eh, paisan, you wanna passa me an argument?"
endif
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top