HangOver19
New Member
- Joined
- Sep 7, 2019
- Messages
- 3
hi everyone,
Please i need your help, i have a workbook with 14 sheets i need to update data weekly, to do that i need to search for that specific data and show it to Userform and update. i have a code but it can only search data in 1 sheet. please could you correct that data to be able to search data in different sheet in my workbook. your help is much appreciated, thank you.
Please i need your help, i have a workbook with 14 sheets i need to update data weekly, to do that i need to search for that specific data and show it to Userform and update. i have a code but it can only search data in 1 sheet. please could you correct that data to be able to search data in different sheet in my workbook. your help is much appreciated, thank you.
Code:
Private Sub CommandButton3_Click()
Dim x As Long
Dim y As Long
x = Sheets("PackCanned").Range("B" & Rows.Count).End(xlUp).Row
For y = 2 To x
If Sheets("PackCanned").Cells(y, 2).Text = TextBox16.Text Then
If Sheets("PackCanned").Cells(y, 4).Text = TextBox17.Text Then
End If
TxtBox1.Text = Sheets("PackCanned").Cells(y, 1)
TextBox2.Text = Sheets("PackCanned").Cells(y, 2)
TextBox3.Text = Sheets("PackCanned").Cells(y, 3)
TextBox4.Text = Sheets("PackCanned").Cells(y, 4)
TextBox5.Text = Sheets("PackCanned").Cells(y, 5)
TextBox6.Text = Sheets("PackCanned").Cells(y, 6)
TextBox7.Text = Sheets("PackCanned").Cells(y, 7)
TextBox8.Text = Sheets("PackCanned").Cells(y, 8)
TextBox9.Text = Sheets("PackCanned").Cells(y, 9)
TextBox10.Text = Sheets("PackCanned").Cells(y, 10)
TextBox11.Text = Sheets("PackCanned").Cells(y, 11)
TextBox12.Text = Sheets("PackCanned").Cells(y, 12)
TextBox13.Text = Sheets("PackCanned").Cells(y, 13)
TextBox14.Text = Sheets("PackCanned").Cells(y, 14)
TextBox15.Text = Sheets("PackCanned").Cells(y, 15)
End If
Next y
End Sub
Last edited by a moderator: