+ Reply to Thread
Results 1 to 6 of 6

Text Inconsistencies in ActiveX Combo boxes

  1. #1
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Akron, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    208

    Text Inconsistencies in ActiveX Combo boxes

    I'm building an application that uses a large number of activex combo boxes. These boxes are getting loaded from specific fields in an associated database.

    I know ActiveX combo boxes can be buggy; I'm wondering if anyone has found a way around the text appearance inconsistencies seen in these controls? e.g., sometimes the text is smaller, sometimes it's spaced wider, sometimes it appears at the top of the combo box sometimes in the center.

    I put a screen shot of what I'm talking about in a word doc along with a control properties screen shot, All controls have the same properties except for the text property.
    Attached Files Attached Files
    Last edited by jrdnoland; 01-19-2010 at 06:23 PM.

  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: Text Inconsistencies in ActiveX Combo boxes

    Hello jrdnoland,

    Could you be more general in your description? You have provided no information that can be used to access your problem. A screen shot of the properties page???? Rather than go through a litany of questions, you should just post your workbook for review.
    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
    12-02-2009
    Location
    Akron, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Text Inconsistencies in ActiveX Combo boxes

    I think if you've had this problem before you'd know what I'm talking about. I put together an example workbook, saved it as an 03 version, and stripped out a lot of the code.

    When the workbook opens, select a number from the combo box (Number of Revisions) to basically unhide the rows. You will see what I'm talking about when you look at the text in the visible combo boxes. These will be loaded from fields in a database, but the result is basically the same.

    Thanks for looking.
    Attached Files Attached Files

  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: Text Inconsistencies in ActiveX Combo boxes

    Hello jrdnoland,

    The problem was your controls were overlapping cell boundaries. I resized the controls to fit within the cells. Problem solved. See the attached workbook.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Akron, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Text Inconsistencies in ActiveX Combo boxes

    I originally put them in holding the alt key while inserting the control, so I thought they were sized to fit the cell exactly.

    It appears that if you make the columns or rows a different size then the combo box and its text will change to fit (position 1). I guess the key to getting all the text to appear consistent (Once it fits the cell(s) perfectly) is to make the combo box (and associated cells) the size you will need them to be.

    Leith, thank you for taking the time to look at this!

  6. #6
    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: Text Inconsistencies in ActiveX Combo boxes

    Hello jrdnoland,

    You're right about the text size changing as the rows and column change. This is because the text boxes are set to move and size with the cells. Consequently, the text boxes are hidden when the rows/columns are hidden and shown again when the rows/columns are unhidden.

    Setting the text boxes to move and not resize with the cells will keep the the text the same size. However, it falls to you to hide and show the text boxes based on the rows/columns selected. Because the ActiveX controls are dependent on the worksheet cells for their placement, the controls should be unhidden after the rows/columns are restored to ensure they are redrawn in the correct position and the correct size.

+ 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