+ Reply to Thread
Results 1 to 5 of 5

fill combobox with unique values.

  1. #1
    Registered User
    Join Date
    10-21-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    59

    fill combobox with unique values.

    Dear Experts,

    I have below code to fill combobox with unique values. This code works only if data is in same sheet of combobox. My data is in sheet1 and combobox is in sheet2. Can some one please modify this code as per my situation.

    In addition please write some descriptions also, to understand this code for me.

    Thanks in advance

    Please Login or Register  to view this content.
    Last edited by ali84pk; 01-29-2011 at 10:51 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: fill combobox with unique values.

    Hi ali84pk
    This will add the unique values from sheet one to the Dictionary
    By adding meaningful names to the Dim's will make the code easier to follow
    Please Login or Register  to view this content.
    Last edited by pike; 01-29-2011 at 09:42 PM. Reason: move "Me.ComboBox1.List = .keys" out side next
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    10-21-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: fill combobox with unique values.

    Thanks Pike, It works perfectly!!!.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: fill combobox with unique values.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: fill combobox with unique values.

    The same effect with:

    Please Login or Register  to view this content.



+ 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