+ Reply to Thread
Results 1 to 15 of 15

assistance filter in listbox on userform using comboboxes based on option buttons

  1. #1
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    assistance filter in listbox on userform using comboboxes based on option buttons

    hello
    i try filtering data into listbox on userform using comboboxs based option buttons and headers columns so i have this code works only for combobox 2, optionbutto2 but not work rests combobox and optionbutton how the code works when i choose button of month it suppses filtering based on col a and fill combobox then choose month and show result into listbox the same thing with the rests optionbuttons i changed the column to filter about case, month, invoice but nothing happened i hope fixing this problem

    HTML Code: 
    Attached Files Attached Files

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    thanks karedog yes it works but combobox1 "month" doesn't show anything

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    You are welcome.

    It's seemed you use non English system language (perhaps Arabic ?), so you must change value of cell of column L with your month's name in your computer's language.

    Other way, we can use the month's index (January=1, February=2, etc), so it is independent of the language of your PC, like this :
    Please Login or Register  to view this content.
    But using this method, the months on column L must be already sorted (January, February, etc), because the name will be completely ignored using this method.

  5. #5
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    yes you're right about month's name in my computer's language i changed and really works but i no know is i understand you about the other way I made in col L the months are number 1,2,3..etc but it gives me error in this line
    HTML Code: 
    could not set the list property. Invalid property value error

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    No, if you use the second method, you don't need to change anything on column L, but it is also ok to change it if you want it.
    Please show the complete code of your Private Sub ComboBox1_Change()

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    It's already 3:00 AM here, and I need goto sleep. I will respond later (if you haven't solve it by yourelf, or no other forum member here help you).

  8. #8
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    by the way i used this January ,February and 1,2 but gives the same error
    HTML Code: 

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,518

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    ABDELFATTA,
    I would use CheckBoxes rather than OptionButtons.

    Replace 4 OptionButtons(1 to 4) with CheckBox(1 to 4).
    Filter by "AND", if you want if to filter "OR" just replace "*" with "+".
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    You accidentally delete one row in red color, that's why it is not working.

    Please Login or Register  to view this content.
    By the way, if you want to display the months on column L, autoupdate with your local language, you can put this formula on L1:L12
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    well done ! jindon your code is better what i have but i have something i added code in Private Sub UserForm_Initialize()
    Set f = Sheets("sheet1")
    HTML Code: 
    to show total col 6 in textbox it doesn't change when i choose another check box cloud you help me about this

  12. #12
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    thanks karedog ,I have last request if is possible I added this code
    HTML Code: 
    to show total in textbox1 it works only wen i run the userform but when i choose in combobox after check optionbutton it gives me error

    HTML Code: 
    could not set the list property. Invalid property value error

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,518

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    Change to
    Please Login or Register  to view this content.
    Last edited by jindon; 11-11-2020 at 05:06 AM.

  14. #14
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    You are welcome, you question has been answered by jindon nicely.

    Regards

  15. #15
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: assistance filter in listbox on userform using comboboxes based on option buttons

    thanks jindon & karedog for your solution nd assistance

+ 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. Filtered data in Listbox based on Option buttons EXCEL VBA
    By saucy_spider in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2018, 12:36 AM
  2. Userform Toggle or Option button based on Listbox selections
    By KML1976 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2016, 10:52 AM
  3. Change Option Buttons Based on Checkboxes in Userform
    By SoothSailor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2014, 03:12 PM
  4. [SOLVED] Filter worksheet data using 4 dependant comboboxes and populate in 'ListBox' on a userform
    By p_nayak268 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-27-2014, 12:41 PM
  5. [SOLVED] Populate userform radio (option) buttons based on data in worksheet
    By d.sanchez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2013, 01:21 PM
  6. userform with 6 option buttons to populate 1 listbox
    By simeonmein in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2013, 05:18 PM
  7. [SOLVED] Disable frames & option buttons on userform based on today's date
    By raj.bris in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-02-2013, 01:05 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