Return string array from function in excel 97

S

Stelio

Hi all,

Is there a way to return a string array from a function instead of a
variant.
I can return a string array from a function in excel 2000 but in 97
gives me a syntax error.

The following show the definition of my function:

Function SortCollection(ByRef collObject As clcRckColl, ByVal
blnSortRacks As Boolean,ByVal blnSortSlots As Boolean, Optional ByVal
strRackNUm As String) As String()

In particular in 97 doesn't like the last parentheses as string()

Do i have to declare it as Variant and remove the parentheses to make
this macro work for all excel versions?

Any help/suggestions will be appreciated.


Thanks,
Stelio
 

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