I have created a user form to search my data table but the code doesn't search the key word in textbox1. it keeps on looping through the data in textbox2-6 until 0. The code should work by inputting the search word in textbox1 and the rest of the boxes will show data from that row from the search word
Code
Private Sub CommandButton1_Click()
Dim WS As Worksheet
Set WS = Worksheets("Daily Ship Data")
row_number = 1
Do
DoEvents
row_number = row_number + 1
items_in_review = WS.Range("C" & row_number)
If item_in_review = TextBox1.Text Then[/SUP]
TextBox2.Text = WS.Range("A" & row_number)
TextBox3.Text = WS.Range("J" & row_number)
TextBox4.Text = WS.Range("L" & row_number)
TextBox5.Text = WS.Range("M" & row_number)
TextBox6.Text = WS.Range("B" & row_number)
End If
Loop Until items_in_review = ""
End Sub
Display More