+ Reply to Thread
Results 1 to 3 of 3

Some label controls change apparent font size when moved up/down

  1. #1
    Registered User
    Join Date
    05-13-2011
    Location
    Bellevue, WA, USA
    MS-Off Ver
    2019
    Posts
    45

    Some label controls change apparent font size when moved up/down

    Some of my label controls change their apparent font size when moved to a different Top property on the form during runtime. Others do not.

    All the label controls are set in design-time to have a font size of 9. For the problem label controls, even if I explicitly set them to 9 in run-time after moving them, they still display as what appears to be a font size of 10. Even if I change the font size to 8, and then to 9 -- or to 10, then to 9 -- in run-time after moving them, they still display as what appears to be font size 10.

    When I check the problem label control's font.size property, it reports the font size it should have (9), not the larger font size that it displays as (10).

    I don't see any difference in the label properties. I tried copying one of the label controls that did not have the problem, and changed its name and caption to replace one of the problem label controls, and deleted the original problem label control. But the problem was still there.

    I tested in Excel 2010, 2007, 2003, 2002, and 2000, and all had the same problem. I tried 97 too but my project is not compatible with it, so I'm not sure if 97 has the same problem.

    For the label controls that are affected by the problem, the problem occurs when I change the label control's Top property during runtime. If I don't change the control's Top property, the problem does not happen for that control.

    Any idea why this problem is happening, and what I can do about it?


    Thanks,

    Greg

  2. #2
    Registered User
    Join Date
    12-03-2012
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Some label controls change apparent font size when moved up/down

    I came upon this thread looking for an answer to the same problem. Wrapping a frame around the offending controls worked for me.

  3. #3
    Registered User
    Join Date
    10-14-2015
    Location
    Lexington, KY
    MS-Off Ver
    2010
    Posts
    1

    Try changing Height

    I recently was having similar trouble with the font size on userform controls misbehaving for no apparent reason. Per [URL="http://excel.tips.net/T002555_Changing_the_Font_Size_in_Combo_Boxes.html"], some userform controls are not as modifiable as they appear. And Yes, they seem to have a mind of their own as they try to be helpful. I found that when ComboBoxes had a Height of 16, the font often appeared as 10, regardless of being set to 8. I found that reducing the Height to 15.8 caused the Font to behave.

+ 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