+ Reply to Thread
Results 1 to 12 of 12

combobox to search any worksheet and display each data in a listbox.

  1. #1
    Registered User
    Join Date
    07-14-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    combobox to search any worksheet and display each data in a listbox.

    I have a userform with 1 combobox(searches any worksheets).5 textboxes that send data to specific worksheet.Now I want to add a listbox that shows data of that worksheet selected from the combobox. I want to do this beacause I have 100+ worksheets.Any help please.

  2. #2
    Registered User
    Join Date
    01-16-2014
    Location
    Algiers, Algeria
    MS-Off Ver
    Excel 2003, Excel 2013
    Posts
    33

    Re: combobox to search any worksheet and display each data in a listbox.

    Hello,
    In Your userform Activate Event put:
    Please Login or Register  to view this content.
    Under your Combobox Change event put something like this:

    Please Login or Register  to view this content.
    Regards.

  3. #3
    Registered User
    Join Date
    07-14-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: combobox to search any worksheet and display each data in a listbox.

    Thank you sir for your prompt reply. Its all working fine but I have a little problem. The listbox is showing a 1 column only like this:

    Date
    Particulars
    OR Reference
    Withdrawal
    Deposit
    Balance

    What I want to show is like this (1 Row, 6 Columns)

    Date Particulars OR Reference Withdrawal Deposit Balance

    And that is also the format that is shown in each worksheet.
    What shall I do to make it like this format in my Listbox.
    Last edited by Marlon1980; 07-18-2015 at 07:12 AM.

  4. #4
    Registered User
    Join Date
    07-14-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: combobox to search any worksheet and display each data in a listbox.

    Please see attached image to make it clearly.

    Capture1 is the result of the code that you gave
    Capture2 is the one that I want to show.

    Capture1.PNGCapture2.PNG

    Thanks once again.
    Last edited by Marlon1980; 07-18-2015 at 07:34 AM. Reason: added image attachment

  5. #5
    Registered User
    Join Date
    01-16-2014
    Location
    Algiers, Algeria
    MS-Off Ver
    Excel 2003, Excel 2013
    Posts
    33

    Re: combobox to search any worksheet and display each data in a listbox.

    Hi Again,
    For multiple columns, I would prefer to use a Listview instead of a Listbox as suggested in the link below:
    https://dl.dropboxusercontent.com/u/...669/Book2.xlsm

    Regards.

  6. #6
    Registered User
    Join Date
    07-14-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: combobox to search any worksheet and display each data in a listbox.

    Thank you so much for all of these. Kudos!.
    But maybe we can add this setup in my Userform. And can we add a little changes (If possible). Can we change the combobox with a Textbox and a search button. Because i have 150 worksheets to find. Please find attached for your refence..Thanks again.

    This is my Userform:

    Userform.jpg

  7. #7
    Registered User
    Join Date
    01-16-2014
    Location
    Algiers, Algeria
    MS-Off Ver
    Excel 2003, Excel 2013
    Posts
    33

    Re: combobox to search any worksheet and display each data in a listbox.

    Hey there,
    Here is a revised version of the file.
    https://dl.dropboxusercontent.com/u/...669/Book2.xlsm

    I believe you might need to add some restrictions to the Add button prior to append lines to the list like:
    1. Checking Data Types of information being entered.
    2. Checking mandatory information
    3. Checking duplicates.

    Regards.

  8. #8
    Registered User
    Join Date
    07-14-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: combobox to search any worksheet and display each data in a listbox.

    Thank you so much XLRATOR. Its working very fine, But Why it's not clearing the field (TEXTBOXES) once I select other sheet from the combobox?

  9. #9
    Registered User
    Join Date
    07-14-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: combobox to search any worksheet and display each data in a listbox.

    Ah, one more thing why Data is not adding in the worksheets. Its only adding in the Listview but when I check the data its not there, The first file (Book1) that you send is sending the data properly.

    Thanks and sorry for bothering you.

  10. #10
    Registered User
    Join Date
    01-16-2014
    Location
    Algiers, Algeria
    MS-Off Ver
    Excel 2003, Excel 2013
    Posts
    33

    Re: combobox to search any worksheet and display each data in a listbox.

    1. That's because we had to ask Excel to do so
    1. And I thought you had to participate a bit

    Here is a revised version: https://dl.dropboxusercontent.com/u/...669/Book2.xlsm

    Regards.

  11. #11
    Registered User
    Join Date
    07-14-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: combobox to search any worksheet and display each data in a listbox.

    Yeah! Its all working Thank you so much.

    Thanks for all the effort sir, Salute for you!

    Till next time.

  12. #12
    Registered User
    Join Date
    01-16-2014
    Location
    Algiers, Algeria
    MS-Off Ver
    Excel 2003, Excel 2013
    Posts
    33

    Re: combobox to search any worksheet and display each data in a listbox.

    You are welcome sir,
    Good luck.

+ 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. Replies: 4
    Last Post: 12-29-2014, 02:46 PM
  2. listbox click to locate and display worksheet data in userform
    By ilmiawan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2014, 08:28 PM
  3. combobox and listbox search engine
    By darkhangelsk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2013, 09:47 AM
  4. Search Data using Combobox Textbox and Listbox
    By Adrastia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2012, 05:27 AM
  5. Display info in Listbox/Combobox
    By Jakes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2011, 06:50 AM
  6. Select combobox item, display wksheet name in listbox
    By ACOM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2009, 05:31 PM
  7. vba-Select from combobox,display in listbox
    By ACOM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2009, 03:46 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