+ Reply to Thread
Results 1 to 5 of 5

ActiveX Combobox listrows property being ignored

  1. #1
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    ActiveX Combobox listrows property being ignored

    I have a set of comboboxes set to list the sheetnames in a document for calculating some stuff (it's not important.
    The problem I am having is that no matter what I do to the listrows property the dropdown list is only 1 item high with tiny scroll arrows when I first click the dropdown arrow. If I unexpand the list and re-expand it again it works fine it just isn't happy when it is first selected.

    I'm pretty sure it is down to the list being cleared and repopulated each time the combobox is selected so the listrow max is set to 0 before the list is populated and is not refreshed untill after the dropdown has expanded with a row count of 0. If I select the box before clicking the dropdown arrow it works fine (again I believe because the list has been populated before the dropdown is expanded).

    Anyone know how to resolve this? (I could set the showdropbutton property to when focus but I would rather have a proper solution).
    Attached Files Attached Files
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: ActiveX Combobox listrows property being ignored

    Hello Leon V (AW),

    Here is the secret. The F4 key will activate the drop down for a ComboBox.

    I have added the SendKeys method to your code to automatically cause the ComboBox list to drop down when the user places the cursor in it.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: ActiveX Combobox listrows property being ignored

    It's not Ideal but I'll take it, thanks.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: ActiveX Combobox listrows property being ignored

    Hello Leon V (AW),

    This can be made to look more like and behave like a Data Validation drop down. The ComboBox "drop down button" can be hidden until the mouse is inside the control or hidden all the time.

  5. #5
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: ActiveX Combobox listrows property being ignored

    Yeah the problem with that is it doesn't hide again after you click out of the box for some reason which is REALLY buggy looking.

+ 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] fill listbox (ActiveX) based combobox (ActiveX)
    By elsg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-31-2014, 11:25 AM
  2. ComboBox ListRows Property
    By garmstro in forum Excel General
    Replies: 4
    Last Post: 03-01-2010, 11:17 PM
  3. 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
  4. Combo Box ListRows property; changing programmatically
    By GPDynamics in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2006, 01:35 PM
  5. Combo Box ListRows property; changing programmatically
    By GPDynamics in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2006, 03:30 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