+ Reply to Thread
Results 1 to 2 of 2

Question about Filter and Combox - to call combobox.value

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2010
    Posts
    49

    Question about Filter and Combox - to call combobox.value

    I have made an 12 codes for calling each month that is called when pushing a listbox. if I push januar then it filtres januar i code 1. If I push februar then it filtres februar in another code and so on....
    Can I instead make one code that uses combobox.value instead of the month, so I avoid 12 codes - one for each month, and instead uses one code that filtres compared to the combobox.value?

    Instead of underneth:
    PHP Code: 
                        .Range("H2").AutoFilter _
     field
    :=8_
     Criteria1
    :="Januar"_
     VisibleDropDown
    :=True 
    Then like this
    PHP Code: 
                        .Range("H2").AutoFilter _
     field
    :=8_
     Criteria1
    :=combobox.value_
     VisibleDropDown
    :=True 
    I cannot get it to work.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Question about Filter and Combox - to call combobox.value

    Hi esbenhaugaard

    I'd check the ComboBox Name in your code
    Please Login or Register  to view this content.
    It would be unusual to have a ComboBox named "combobox"; they'll be Named "ComboBox1", "ComboBox2", etc.. Unless of course you've renamed then.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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