how to show search results in listbox

yazan

New Member
Joined
Aug 1, 2021
Messages
14
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top