hi all...
when I use ReDim an array in Command1_Click I use it anymore in Command2_Click. How could I use it?
I'm using this code:
Code:
Dim F As Integer

Private Sub Command1_Click()
  F = Val(Text1.Text) 'F is bigger than 3 for sure
  ReDim a(1 To F) As String
  a(3) = "Please! be saved!"
End Sub

Private Sub Command2_Click()
  MsgBox a(3)
End Sub
You see, everything works fine when I'm processing the Command1_Click, but when I come to Command2, I get the "a" variable highlighted, and error that says: "Sub or Function not defined"

Any idea so I'll be able to use the array in any procedure at the form?