E
elizabeth.cornelius
Hi Guys
I am trying to use an array to select various textboxes on a userform
but keep getting an error when compiling the code saying 'Method or
data member not found'. I understand the essage but cannot work out
how to overcome it.
Here is the code, it is pretty simple as it is just trying to sort out
the code.
Thanks
Damon & Elizabeth
****************CODE****************
Private Sub CommandButton1_Click()
Dim myTest, myTest1
Dim i As Integer
myTest = Array("txt1", "txt2")
myTest1 = Array("Goodbye", "So long", "Adiue")
For i = LBound(myTest) To UBound(myTest)
UserForm1.myTest(i) = myTest1(i)
Next i
End Sub
*******************END CDE**********************
I am trying to use an array to select various textboxes on a userform
but keep getting an error when compiling the code saying 'Method or
data member not found'. I understand the essage but cannot work out
how to overcome it.
Here is the code, it is pretty simple as it is just trying to sort out
the code.
Thanks
Damon & Elizabeth
****************CODE****************
Private Sub CommandButton1_Click()
Dim myTest, myTest1
Dim i As Integer
myTest = Array("txt1", "txt2")
myTest1 = Array("Goodbye", "So long", "Adiue")
For i = LBound(myTest) To UBound(myTest)
UserForm1.myTest(i) = myTest1(i)
Next i
End Sub
*******************END CDE**********************