I used the following code to search data in my userform. I want to populate the data in rest of the textboxes by filling data in one of the textboxes. However the code doesnt run and gives ( runtime error "13" type mismatch)
Private Sub TextBox6_Change()
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("S_in")
Dim i As Integer
i = Application.Match(Me.TextBox6.Value, sh.Range("B:B"), 0)
Me.TextBox6.Value = sh.Range("B" & i).Value
Me.TextBox1.Value = sh.Range("C" & i).Value
Me.TextBox2.Value = sh.Range("D" & i).Value
Me.TextBox3.Value = sh.Range("E" & i).Value
Me.TextBox4.Value = sh.Range("F" & i).Value
Me.ComboBox1.Value = sh.Range("G" & i).Value
Me.TextBox5.Value = sh.Range("I" & i).Value
i would appreciate if someone could help me with this
Bookmarks