N
Nick via AccessMonster.com
Hi,
I'm having some troubles using a string array in a module in VBA. I can
dimension the string array but am unable to set the variables equal to a
constant within the module (Really needs to be in the module). Actual code
(all two lines of it) is near the end.
When I try to set strStep1(1) = "Description" by using 'Set' or 'Let'
it gives an error (Invalid outside procedure), and when I try using 'Const'
declaration, an error is generated when the program gets to the
parenthesis.
Public strStep1(10) As String
Set strStep1(1) = "Description" 'Invalid outside procedure
-or-
Public Const strStep(1) as string = "Description" 'Gets to '(' and expects
'As' or '='
Any help would be appreciated, post back if clarification is needed.
Thanks,
Nick
I'm having some troubles using a string array in a module in VBA. I can
dimension the string array but am unable to set the variables equal to a
constant within the module (Really needs to be in the module). Actual code
(all two lines of it) is near the end.
When I try to set strStep1(1) = "Description" by using 'Set' or 'Let'
it gives an error (Invalid outside procedure), and when I try using 'Const'
declaration, an error is generated when the program gets to the
parenthesis.
Public strStep1(10) As String
Set strStep1(1) = "Description" 'Invalid outside procedure
-or-
Public Const strStep(1) as string = "Description" 'Gets to '(' and expects
'As' or '='
Any help would be appreciated, post back if clarification is needed.
Thanks,
Nick