ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Return string array from function in excel 97 (https://www.excelbanter.com/excel-programming/284396-return-string-array-function-excel-97-a.html)

Stelio

Return string array from function in excel 97
 
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

patrick molloy

Return string array from function in excel 97
 
Fine in 2000 or later, don't recall if it works in '97


-----Original Message-----
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
.



All times are GMT +1. The time now is 07:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com