You'll have to line up the textbox numbers with the column numbers.
![]()
Private Sub CommandButton1_Click() Dim Answer As Variant Dim A As Long Dim tmp Answer = TextBox1.Value If Answer <> "" Then For A = 2 To 37 '=VLOOKUP(B2, B2:AQ165000,2,0) tmp = Application.VLookup(Val(Answer), Worksheets("Dispatchcalls").Range("B1:AQ16"), A - 1, False) Me.Controls("TextBox" & A).Value = tmp 'so on and so forth for several other combo- and textboxes Next End If End Sub
Bookmarks