Hello guys,
i need your help please,
i have a search form that if i searched for application by its ID it will find it and re-fill the main form with data
i know the codes for re-filling textboxes and combo boxes
for example :
Dim w As Long, f As Long
Dim ws3 As Worksheet
Set ws3 = Worksheets("water")
w = ws3.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).row
For f = 2 To w
If Trim(ws.Cells(f, 1).Value) = Trim(TextBox1.Text) Then
searchform3.TextBox5.Text = ws3.Cells(f, 8).Value
searchform3.TextBox7.Text = ws3.Cells(f, 13).Value
searchform3.ComboBox2.Text = ws3.Cells(f, 9).Value
Exit For
End If
Next f
but the problem that i have , is with re-filling listbox with cells contents
i have multi-rows that have the same application ID
listbox name : listbox1
form that contains listbox : searchform3
worksheet : doorsandwindows
i need your help please,
i have a search form that if i searched for application by its ID it will find it and re-fill the main form with data
i know the codes for re-filling textboxes and combo boxes
for example :
Dim w As Long, f As Long
Dim ws3 As Worksheet
Set ws3 = Worksheets("water")
w = ws3.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).row
For f = 2 To w
If Trim(ws.Cells(f, 1).Value) = Trim(TextBox1.Text) Then
searchform3.TextBox5.Text = ws3.Cells(f, 8).Value
searchform3.TextBox7.Text = ws3.Cells(f, 13).Value
searchform3.ComboBox2.Text = ws3.Cells(f, 9).Value
Exit For
End If
Next f
but the problem that i have , is with re-filling listbox with cells contents
i have multi-rows that have the same application ID
listbox name : listbox1
form that contains listbox : searchform3
worksheet : doorsandwindows