Can an array be returned from a function call

B

bmwmcrider

Version: 2004
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

Hello,

While writing a VBA function returning an array of type variant I got an "expected:end of statement" error complaint from the compiler. I tried other array data types for the function return and got the same result every time.

So my question is can VBA functions in Excel return arrays? I know that this isn't a problem for the PC version of Excel because I do it in several instances.

I am using Excel For Mac 2004.

Thanks,

Mike
 
J

JE McGimpsey

Version: 2004
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

Hello,

While writing a VBA function returning an array of type variant I got an
"expected:end of statement" error complaint from the compiler. I tried other
array data types for the function return and got the same result every time.

So my question is can VBA functions in Excel return arrays? I know that this
isn't a problem for the PC version of Excel because I do it in several
instances.

I am using Excel For Mac 2004.

Functions which can return arrays became available in VBA6. XL04 is
still at VBA5.

You can return an array in a Variant, but you cannot return an array of
any type.
 
B

bmwmcrider

Thanks for the reply - I forgot the fact that the VBA version for Excel For Mac 2004 is at VBA5.

Mike
 

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

Similar Threads


Top