+ Reply to Thread
Results 1 to 9 of 9

ActiveX ComboBox DropDown

  1. #1
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    269

    ActiveX ComboBox DropDown

    I have an activeX combobox on my spreadsheet. When I show it, it is collapsed but I can make it show already dropped down by using the DropDown method (not shown in any documentation that I can find). However, if I then want to then hide the combobox by setting visible property set to false, it still shows on my worksheet. How do I hide the box without selecting anything. Note that if I select something from the list, it seems to collapse but still won't become hidden. How do I control the visiblity of the combobox after I use the DropDown method?

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: ActiveX ComboBox DropDown

    You can set the width to zero.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    269

    Re: ActiveX ComboBox DropDown

    Thanks..good idea but would sure like to have more elegant solution. Tried setting combox1.DroppedDown property to false but apparently the ActiveX ComboBox does not recognize the DroppedDown property.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: ActiveX ComboBox DropDown

    Well it's not DroppedDown it's DropDown - are you using validation or just the CB with its linked list?

  5. #5
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    269

    Re: ActiveX ComboBox DropDown

    Apparently DropDown is a Method and not a Property. When I executed in VBA the code ComboBox1.DropDown the box shows as drops down. When I set the visible property to False, it continues to show on the screen. The Combobox has a property of DroppedDown but this gives an error in VBA (look up the properties of a combobox and you will see). I cannot find any listing of either properties or methods that show the DropDown Method (I found this by trial and error).

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: ActiveX ComboBox DropDown

    Did you try the zero width? - are you using validation or just the CB with its linked list?

  7. #7
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    269

    Re: ActiveX ComboBox DropDown

    I am using a CB who's list I create using additem each time the User needs to select from the box. I am trying to find a more direct solution than a work around like using zero width. I would have thought that there would have been a command to collapse a combo box since there is the DropDown method. After all, what goes down usually comes back up!

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: ActiveX ComboBox DropDown

    After all, what goes down usually comes back up!
    I didn't know that

    I guess you're not using validation?

  9. #9
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    269

    Re: ActiveX ComboBox DropDown

    NO, I'm not using validation...I populate the list box each time the user clicks a "Select" button. I have tried the DroppedDown property setting but this gives me an error. I don't think the DroppedDown propery can be set for a combobox in VBA. As I said, I can show the comboox in the dropped down state by using the ComboBox.DropDown method. Just can then get it hide when I set the visible property and the disabled properties to false...it just keeps showing in the dropped down state on the screen.

+ 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. [SOLVED] ComboBox to populate Listbox and 2nd Combobox based on 1st combobox dropdown choice
    By bbqqsmokeman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2017, 08:21 PM
  2. ActiveX Combobox dropdown 'reset' when repopulating
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-27-2017, 06:01 AM
  3. [SOLVED] Detect click on dropdown arrow in an activex dropdown box
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2017, 08:23 AM
  4. Replies: 0
    Last Post: 10-26-2015, 04:25 PM
  5. ActiveX combobox datalist dependant on previous combobox selections
    By Mrs Poodle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2014, 07:07 AM
  6. [SOLVED] fill listbox (ActiveX) based combobox (ActiveX)
    By elsg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-31-2014, 11:25 AM
  7. Populate a activeX combobox from a selection of another combobox
    By ptramel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2009, 06:50 PM

Tags for this Thread

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