+ Reply to Thread
Results 1 to 13 of 13

I would like to help with a code to filter the list box in terms of the combobox

  1. #1
    Registered User
    Join Date
    10-16-2021
    Location
    egypt
    MS-Off Ver
    2016
    Posts
    75

    I would like to help with a code to filter the list box in terms of the combobox

    I would like to help with a code to filter the list box in terms of the combobox and column number 3 in the list box
    Attached Files Attached Files
    Last edited by saftawy1; 04-22-2022 at 07:10 PM. Reason: add attachement

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,222

    Re: I would like to help with a code to filter the list box in terms of the combobox

    Attach the workbook according to the yellow banner at the top of the page.

    Artik

  3. #3
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,222

    Re: I would like to help with a code to filter the list box in terms of the combobox

    It's not entirely clear what your problem is.

    1. If you want the text you are looking for, entered in TextBox1, to be case insensitive, replace this line
    Please Login or Register  to view this content.
    with this one
    Please Login or Register  to view this content.
    2. If you want the date to be displayed in your system format rather than the US format, then change this loop
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    3. If the text is not found, add a condition:
    Please Login or Register  to view this content.
    Artik

  4. #4
    Registered User
    Join Date
    10-16-2021
    Location
    egypt
    MS-Off Ver
    2016
    Posts
    75

    Re: I would like to help with a code to filter the list box in terms of the combobox

    Thank you for your suggestions, but I do not have a problem with my code, but I would like to add a code to filter the list box based on what I choose from the combobox2

  5. #5
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: I would like to help with a code to filter the list box in terms of the combobox

    hi saftawy1, attached a solution I gave to a 'poster' on this site recently - it enables a search on any selected column of the data according to the selection of the 'option-button'.
    I do not understand why you have so much unnecessary code in a simple 'UserForm' application.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  6. #6
    Registered User
    Join Date
    10-16-2021
    Location
    egypt
    MS-Off Ver
    2016
    Posts
    75

    Re: I would like to help with a code to filter the list box in terms of the combobox

    This code does filtering by the checkbox and the combobox together. Is it possible to help make the code work in the checkbox only if the combobox is empty, and with both if the combobox has an option?
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by saftawy1; 04-24-2022 at 11:28 AM. Reason: add a new attachement

  7. #7
    Registered User
    Join Date
    10-16-2021
    Location
    egypt
    MS-Off Ver
    2016
    Posts
    75

    Re: I would like to help with a code to filter the list box in terms of the combobox

    Is there any possibility to modify this code or not?

  8. #8
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: I would like to help with a code to filter the list box in terms of the combobox

    I do not see that code anywhere in your original file.
    Grabbing bits of code from here and there and gluing them together is not an efficient way of developing an app.
    where did the code come from ???
    get away from using 'rowsource' for loading listboxes/comboboxes it is an unstable method and using 'removeitem' is a cumbersome method especially when used with a large data file.
    populate using structured tables and arrays.
    Last edited by torachan; 04-24-2022 at 10:53 AM.

  9. #9
    Registered User
    Join Date
    10-16-2021
    Location
    egypt
    MS-Off Ver
    2016
    Posts
    75

    Re: I would like to help with a code to filter the list box in terms of the combobox

    sorry ,i add a new attachement

  10. #10
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: I would like to help with a code to filter the list box in terms of the combobox

    run debug your file is nothing like your original query ???????

  11. #11
    Registered User
    Join Date
    10-16-2021
    Location
    egypt
    MS-Off Ver
    2016
    Posts
    75

    Re: I would like to help with a code to filter the list box in terms of the combobox

    I uploaded the last file with the code to be modified and it works fine for me

  12. #12
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: I would like to help with a code to filter the list box in terms of the combobox

    Attachment 778069

    no sheet named "report" ????

    With ThisWorkbook.Sheets("report").Range("b5:Q2000").ClearContents

  13. #13
    Registered User
    Join Date
    10-16-2021
    Location
    egypt
    MS-Off Ver
    2016
    Posts
    75

    Re: I would like to help with a code to filter the list box in terms of the combobox

    What does this have to do with the code I want to modify?
    Also the attached file is a thumbnail model of the file I'm working on

+ 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] Combobox filter while typing is confused with other combobox list
    By ronettes in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-18-2019, 09:04 AM
  2. Combobox list like filter
    By jayvillalobos123 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-07-2017, 02:24 AM
  3. Replies: 1
    Last Post: 01-26-2015, 04:42 PM
  4. Macro to filter data to search terms selected from ComboBox (Form Control)
    By JasonRay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2013, 05:08 PM
  5. Replace list terms within a spreadsheet with terms from a new list
    By panosino in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2013, 08:28 AM
  6. How to filter a list box through using a combobox?
    By ZahraShuaib in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-03-2013, 07:12 AM
  7. Replies: 9
    Last Post: 11-03-2010, 11:42 AM

Tags for this Thread

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