Hi All,
I am trying to populate text boxes from a combo box choice.
When i choose the customer number, i want the text boxes to fill with the details of that customer. Here is what i have so far.
Private Sub ComboBox1_Change()
'Variables
Dim Choice As String
Dim InRow As Integer
'read in var from combobox
Choice = Me.ComboBox1
Sheets("Clients").Select
'select the row with the active cell in it
Cells.Find(What:=Choice, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Select
InRow = ActiveCell.Row
'display the data in the textbox
Me.TextBox1 = Sheets("Clients").Cells(InRow, 2)
Me.TextBox2 = Sheets("Clients").Cells(InRow, 3)
Me.TextBox3 = Sheets("Clients").Cells(InRow, 4)
Me.TextBox4 = Sheets("Clients").Cells(InRow, 5)
Me.TextBox5 = Sheets("Clients").Cells(InRow, 6)
Me.TextBox7 = Sheets("Clients").Cells(InRow, 7)
When running this code i get a named arguments not found error and the search format section in red is highlighted.
Please help me get rid of this error for good.
Thanks
Adam
Bookmarks