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

  • Thread starter Thread starter baobob
  • Start date Start date
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
 
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
 
Back
Top