show data into multiple textbox from filled listbox based on search textbox and highlight into listbox

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,429
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
hello
i have data when show userform show all of data into list box i'm asking if is possible when i search data in textbox1 then show directly the data in multiple textbox and highlight by blue in listbox as my picture without i select this from listbox
gg.jpg
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
actually i don't understand and i have another problem i found out it also occurs in the second row asd13
 
Upvote 0
Try this. works for everyone

Rich (BB code):
Private Sub TextBox1_Change()
  Dim i As Long, j As Long
  
  With ListBox1
    For j = 2 To 10
      Controls("TextBox" & j) = ""
    Next
    .ListIndex = -1
    If TextBox1 = "" Then Exit Sub
    For i = 0 To .ListCount - 1
      If LCase(.List(i, 1)) = LCase(TextBox1) Then
        .Selected(i) = True
        For j = 2 To 10
          Controls("TextBox" & j) = .List(i, j - 2)
        Next
        Exit For
      End If
    Next
  End With
End Sub
 
Upvote 0
thanks dante you're legend the code is excellent what if i edit data in multiple textbox and update in listbox and worksheet
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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