Tocogroup
asked on
How do I declare a public array variable in Excel VBA ?
Hi,
I am trying to declare a public variable array in Excel VBA as follows :
Public Qty(10) As String
.....but when I reference the array in my Sub it returns the following error :
"Constants, fixed length strings, arrays, user-defined types and Declare statements not allowed as Public members of object modules"
I'm able to reference other variables as Public but not the array. The variables are held in a Class Module called c_Invoice (I'm not sure how this differs from other Modules).
Any ideas
Regards
Toco
I am trying to declare a public variable array in Excel VBA as follows :
Public Qty(10) As String
.....but when I reference the array in my Sub it returns the following error :
"Constants, fixed length strings, arrays, user-defined types and Declare statements not allowed as Public members of object modules"
I'm able to reference other variables as Public but not the array. The variables are held in a Class Module called c_Invoice (I'm not sure how this differs from other Modules).
Any ideas
Regards
Toco
ASKER
Excuse my ignorance but how do I do that ? I'm not sure what you mean.
Toco
Toco
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Kevin