I have a userform with 500+ textboxes which are supposed to be filled up from some cells on some sheet. The part where i refer to sheets and cells is clear. But i am at a loss about how to fill 500+ textboxes without refering them one by one.
I do not want to do this:
Textbox1.value = sheet1.cells(x,y)
Textbox2.value = sheet1.cells(x+1,y)
.
.
.
I want to do this:
Textbox(x).value = sheet1.cells(x,y)
Of course in a loop
I have tried:
Private Sub UserForm_Activate()
Dim s As String
Dim m As Integer
Dim k As Integer
Dim l As Integer
s = "TextBox1"
For k = 1 To 10
s.Value = Sayfa9.Cells(l, m)
s = Replace(s, k, k + 1)
m = m + 1
Next k
end sub
Of course s.Value is wrong. How do i do this?