- #1
Saladsamurai
- 3,020
- 7
Hello there!
I have created a Useform with a few rows of TextBoxes.
I have Changed the names of them all to "Powerbox1" , "Powerbox2" ...etc.
Now in my code, I would like to store all of those values taken from the UserForm and store them in an array called Power()
I have been trying things like
But this method does not work.
Is there anyway to assign values to this array without doing them individually?
I have created a Useform with a few rows of TextBoxes.
I have Changed the names of them all to "Powerbox1" , "Powerbox2" ...etc.
Now in my code, I would like to store all of those values taken from the UserForm and store them in an array called Power()
I have been trying things like
Code:
Private Sub OkayButton_Click()
Dim Power(48) As Single
Dim i As Integer
For i = 1 To 48
Power(i) = PowerForm.Powerbox(i).Text
Next i
MsgBox Power(1)
End Sub
But this method does not work.
Is there anyway to assign values to this array without doing them individually?