E
eclectic.01
I have been trawling for days for what must be VERY simple ... I just
cant find it
I would like to create a global array, populate it from one function,
wait for user interaction, then read from it in another. Sound simple?
Well ...
I have tried the following (the most simple example I could think of):
Public myArray(0 To 10) As String
Sub Test()
myArray(0) = "Test"
MsgBox (myArray(0))
End Sub
When trying to run 'Test', I receive the error "Sub or Function not
defined" on the "myArray(0) = "Test"" line ...
Regardless of setting 'myArray' as public, 'Test' is not recognizing
the global array ... it thinks it is a function ...
The below works, but of course in this example 'myArray'is not global,
which is what I need:
Sub Test()
Dim myArray(0 To 10) As String
myArray(0) = "Test"
MsgBox (myArray(0))
End Sub
What must I do to actually create and then use a global array? I need
help quick! running out of hair!
Cheers!
cant find it
I would like to create a global array, populate it from one function,
wait for user interaction, then read from it in another. Sound simple?
Well ...
I have tried the following (the most simple example I could think of):
Public myArray(0 To 10) As String
Sub Test()
myArray(0) = "Test"
MsgBox (myArray(0))
End Sub
When trying to run 'Test', I receive the error "Sub or Function not
defined" on the "myArray(0) = "Test"" line ...
Regardless of setting 'myArray' as public, 'Test' is not recognizing
the global array ... it thinks it is a function ...
The below works, but of course in this example 'myArray'is not global,
which is what I need:
Sub Test()
Dim myArray(0 To 10) As String
myArray(0) = "Test"
MsgBox (myArray(0))
End Sub
What must I do to actually create and then use a global array? I need
help quick! running out of hair!
Cheers!