Hi,
I have two userforms, let's say UserForm1 and UserForms2.
When pressing a button on UserForm2, 12 txtFields on UserForm1 should be filled.
It works if I would create 12 lines like:
[VBA]
UserForm1.txtField1.Value = Range1.Offset(0, 20)
UserForm1.txtField2.Value = Range1.Offset(0, 21)
etc.
[/VBA]
But I would like to create this via a for loop, I came up with the thing below but it does not work.
[VBA]
Dim k As Long
For k = 1 To 12
UserForm1.txtField & k & .Value = Range1.Offset(0, k + 19)
Next k
[/VBA]
Please help me. Thanks in advance!