+ Reply to Thread
Results 1 to 11 of 11

problem in search result in listbox

  1. #1
    Forum Contributor kar2rost's Avatar
    Join Date
    07-02-2022
    Location
    Here
    MS-Off Ver
    Pro Plus 2021 (Windows 11 21H2 64-bit)
    Posts
    121

    problem in search result in listbox

    Hi everyone
    I have a problem with this code
    The code works well and after writing in the text box or selecting the combo box
    It shows the results in a listbox
    But this is my problem
    After showing the results in the list box, the scroll list box goes to the end
    I want it to show only the number it finds in the listbox
    I show my problem better in the photo


    Please Login or Register  to view this content.
    Attached Images Attached Images
    love to learn

  2. #2
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: problem in search result in listbox

    You can actually do this with a few lines of code. But, if you want good help you have to post your workbook

  3. #3
    Forum Contributor kar2rost's Avatar
    Join Date
    07-02-2022
    Location
    Here
    MS-Off Ver
    Pro Plus 2021 (Windows 11 21H2 64-bit)
    Posts
    121

    Re: problem in search result in listbox

    tanks bro
    the workbook uplaoded
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: problem in search result in listbox

    Here a simple example. I think you can rewrite this to your situation. This is the only code you need. See file

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JEC.; 04-26-2024 at 11:49 AM.

  5. #5
    Forum Contributor kar2rost's Avatar
    Join Date
    07-02-2022
    Location
    Here
    MS-Off Ver
    Pro Plus 2021 (Windows 11 21H2 64-bit)
    Posts
    121

    Re: problem in search result in listbox

    thanks my dear friend
    Your file is good
    But there are a few problems
    My data has nine columns and 2000 rows
    which becomes extremely slow when searching
    another point
    If the first column is empty between the lines, its continuation will not be displayed in the list box
    If possible, please look at my code so that the results of the list box are shown only in the number found and when I scroll to the end of the list box, there are no empty spaces.

  6. #6
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: problem in search result in listbox

    Ok listen, delete all of your code behind the userform. Then only add this code below. Still superfast on 20000 rows on my side.
    Note that every row in the listbox is one string, instead of individual records.

    Test on your posted sample file

    Please Login or Register  to view this content.
    Last edited by JEC.; 04-26-2024 at 01:39 PM.

  7. #7
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,387

    Re: problem in search result in listbox

    Try modify this line
    Please Login or Register  to view this content.
    "Presh Star Who has help you *For Add Reputation!! And mark case as Solve"

  8. #8
    Forum Contributor kar2rost's Avatar
    Join Date
    07-02-2022
    Location
    Here
    MS-Off Ver
    Pro Plus 2021 (Windows 11 21H2 64-bit)
    Posts
    121

    Re: problem in search result in listbox

    Quote Originally Posted by daboho View Post
    Try modify this line
    Please Login or Register  to view this content.
    It's really amazing
    thanks my dear friend

  9. #9
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: problem in search result in listbox

    #6 will be faster though

  10. #10
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,387
    Quote Originally Posted by kar2rost View Post
    It's really amazing
    thanks my dear friend
    Welcome, good luck

  11. #11
    Forum Contributor kar2rost's Avatar
    Join Date
    07-02-2022
    Location
    Here
    MS-Off Ver
    Pro Plus 2021 (Windows 11 21H2 64-bit)
    Posts
    121

    Re: problem in search result in listbox

    Quote Originally Posted by JEC. View Post
    #6 will be faster though
    Thank you too
    But implementing that code for 9 columns and 2000 lines was really time consuming
    In any case, thank you for your time, my good friend

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] ListBox Search result missing row heading
    By kobi1735 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-09-2023, 10:28 AM
  2. Displayed listbox result from search to textbox
    By seercoven in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2022, 10:33 PM
  3. [SOLVED] Populate Userform With Listbox Search Result
    By sgf0568 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2022, 10:15 AM
  4. Search Result are loading slow in Listbox in Excel.
    By ahsan.masood1980 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2020, 09:08 AM
  5. [SOLVED] Issue with search and display result on ListBox as you type on a TextBox
    By rakotonirinas in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2019, 07:15 AM
  6. Showing search result in listbox
    By Mahmoudelnemr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2019, 07:45 AM
  7. [SOLVED] Populate a Listbox in a UserForm based on a Search Result
    By clapforthewolfman in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 07-17-2013, 07:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1