+ Reply to Thread
Results 1 to 9 of 9

Display worksheet information on userform textbox Next & Previous buttons

  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Display worksheet information on userform textbox Next & Previous buttons

    Hello Again,

    I am seeking help to searching textbox value until available possible.

    I have searching option which is working fine and I need to continue search using next or previous button for same value match on a worksheet.

    For Example:

    I am searching for value "Dar Al" which is available 2 times on a worksheet for 2 different records but using search box it is displaying only very first record. I want to display these 2 records by using next or previous buttons.

    Sample worksheet is attached for your reference.

    Due to some error I am unable to upload a sample file. Please follow the link below.

    GoogleDriveLink

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Display worksheet information on userform textbox Next & Previous buttons

    Hi hecgroups,
    check the attached file.
    I marked the sign '****** rows that changed in the code.
    Click several times on the "Search" button to see a few records.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Display worksheet information on userform textbox Next & Previous buttons

    Thanks for your response but I have to click for 2 to 3 times. Is their any solution for single click. Actually it will be better if I have Next or Previous buttons working to view the records.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Display worksheet information on userform textbox Next & Previous buttons

    If you enter "Dar Al" in the search box, then the macro will find Dar Al Shefa Hospital in B13, and then Dar Al Shefa Hospital in EP13 that are in the same row. Therefore you need to press 2 or 3 times to move to the next record. Because your macro looks for matches on an entire worksheet.

  5. #5
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Display worksheet information on userform textbox Next & Previous buttons

    I am sorry some time user itself confused with large data. it is working by single click. I have last request. I should display a message saying that "Dar Al" or what ever a value is looking by a user is it reach till the last row means last data to avoid continually more search.

    I hope you understand what is asking for...

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Display worksheet information on userform textbox Next & Previous buttons

    try it
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Display worksheet information on userform textbox Next & Previous buttons

    now I have a issue it is searching first record only not the rest.

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Display worksheet information on userform textbox Next & Previous buttons

    It works for me. For example macro found 6 cells with an "Omar Al"

  9. #9
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Display worksheet information on userform textbox Next & Previous buttons

    Thank you very much for your solution now I will study your script and try to implement it according to my boss requirement. Thanks for your efforts. Topic marked as solved and reputation is added.

+ 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] Stop userform textbox from remembering previous entry
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 12-15-2013, 01:34 PM
  2. [SOLVED] Userform Previous Next Buttons to Show Only Filtered Records?
    By cindy71 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2012, 10:38 AM
  3. Create Next /Previous command buttons also Modify existing record in a Userform
    By rabalam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2012, 04:10 PM
  4. Previous and Next button in userform to show in textbox
    By cgkmal in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-25-2011, 02:47 AM

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