How to declare a global array in a form?
I need the array to be populated in one procedure, and read in another procedure.
With the current code in line 1 ofFillArray_1
array1 = Array( ...
I get an error message:
Expected variable or procedure, not project
Code:
Dim array1() As String ' Array
Private Sub Exe_btn_Click()
PrintArray
End Sub
Public Sub FillArray_1()
array1 = Array( _
"member_1", _
"member_2", _
"member_3")
End Sub
Public Sub PrintArray()
FillArray_1
Dim i As Integer
For i = LBound(array1) To UBound(array1)
Debug.Print array1(i)
Next i
End Sub