+ Reply to Thread
Results 1 to 8 of 8

ComboBox - VBA - Unique Views...

  1. #1
    Registered User
    Join Date
    07-10-2009
    Location
    Honiton, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    ComboBox - VBA - Unique Views...

    Hi Guys,

    I've been struggling with this for a while, I've used an advanced filter upuntil now but it's not working.

    I have a column that is updated several times a day, I need to be able to view that list in a userform combo box and that box to be able to react like an autofilter list. I've tried the advanced filter thing but as th elist is contantly updated it makes this very hard to handle as I have to set macros to compile the list and then delete it once it's been used. Is there a way I can set vba code so the ComboBox populates unique fields, sorted AZ and removed the blanks without using the advanced filter..??

    I've been researching this for ages and can't find a solution... Please help.



    Regards

    Jason
    Last edited by Strat94; 07-15-2009 at 09:18 AM. Reason: Solved

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: ComboBox - VBA - Unique Views...

    This example has a ListBox that can be Filtered

    FilterForm.zip
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-10-2009
    Location
    Honiton, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: ComboBox - VBA - Unique Views...

    Thanks Roy, certainly looks interesting... Trust that if I dig deep enough within the code I will actually find what I'm looking for here... Thanks for your help.

  4. #4
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180

    Re: ComboBox - VBA - Unique Views...

    Hi,

    Try this

    Please Login or Register  to view this content.
    HTH
    Kris

  5. #5
    Registered User
    Join Date
    07-10-2009
    Location
    Honiton, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: ComboBox - VBA - Unique Views...

    Couldn't get that to work....

    To make sure I am doing this right, say for example that my list will appear between B10:B251, do I put those two values in the value boxes and leave the row source option blank..??

  6. #6
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180

    Re: ComboBox - VBA - Unique Views...

    Hi,

    Just replace

    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.
    and leave the rowsource property blank.

    HTH

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: ComboBox - VBA - Unique Views...

    Strat94, have a good look at the example & post back with specific questions

  8. #8
    Registered User
    Join Date
    07-10-2009
    Location
    Honiton, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: ComboBox - VBA - Unique Views...

    OK, thanks guys.

    I don't understand which part of the code populates each combo box and then entres the info into the list box.

    The ideal is to take a list between B10:B251, on a sheet called Week 1, stuff that list into a combo box on a user form, filter out the duplicates and put it in alphabetical order and once that is done, the user selects one and all the matching of that selection is displayed in the list box.

    I can work out some of the stuff you provided Roy but I get confused as there are 5 combo boxes all working together in that example and I can't seperate them.

    krishnakumar, I'm sorry, but yours doesn't work at all. I am placing the code in the view code bit on the combobox on the form, is that the right place..??

    Sorry to be so vague guys.

    J

+ 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