+ Reply to Thread
Results 1 to 5 of 5

how to add a Dropdown list in combo box (Active x control)

  1. #1
    Registered User
    Join Date
    04-03-2012
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2013
    Posts
    26

    how to add a Dropdown list in combo box (Active x control)

    Hi i want to add an drop down list to a activeX combo box using a VB code. i tried this code but it doesn't work.

    Private Sub ComboBox1_Change()

    With Sheet1.ComboBox1
    .AddItem "Paris"
    .AddItem "New York"
    .AddItem "London"
    End With

    End Sub


    Thanks!

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: how to add a Dropdown list in combo box (Active x control)

    That code will only trigger when you type something in the combobox, which is probably a bit late. Try the worksheet_Activate event or workbook_open instead.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    04-03-2012
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: how to add a Dropdown list in combo box (Active x control)

    Hi Romperstomper,

    Thanks!. Once I typed something in the Combo box the drop down list appeared. But when I select something new from the drop down, it gets accumulated and the list keep getting longer and longer. please help. i just want to create only these three items only on the list.

  4. #4
    Registered User
    Join Date
    04-03-2012
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: how to add a Dropdown list in combo box (Active x control)

    Please Help:

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: how to add a Dropdown list in combo box (Active x control)

    You can use:
    Please Login or Register  to view this content.
    rather than AddItem

+ 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. Code works with Combo Box-Form Control, but not with Combo box - ActiveX Control
    By nangys in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2014, 08:51 AM
  2. [SOLVED] VBA Code to have a repeating form control /Active X control (List box) in every row
    By Ehezve in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2013, 08:55 PM
  3. Replies: 0
    Last Post: 08-22-2012, 03:52 PM
  4. combo box dropdown list
    By pczmut in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-29-2006, 10:15 AM
  5. Combo Box List Dropdown
    By HornJM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-15-2006, 05:15 PM

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