I am creating a user form in VBA, and what I am looking for is to search for a specific text, when it is found, i want the textboxes to be filled from the next cells.
my code would be:
i = TextBox1.Value
Set orange = Sheets(1).Range("A1:A10000").Find(i, LookIn:=xlValues, lookat:=xlWhole)
If orange Is Nothing Then
MsgBox "No Match Found"
Else: j = orange.Address
ka = 1
kb = 11
For k = 1 To 10
UserForm1(TextBox & kb).Value = Sheets(1).Range(j).Offset(0, ka).Value
ka = ka + 1
kb = kb + 1
Next k
of course UserForm1(TextBox & kb).Value = Sheets(1).Range(j).Offset(0, ka).Value does not work.
any help with this?