+ Reply to Thread
Results 1 to 5 of 5

Automatically Change Font Sizes on Userform

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    Elkton, MD
    MS-Off Ver
    365
    Posts
    32

    Question Automatically Change Font Sizes on Userform

    I have a Userform that includes labels, textboxes, combo boxes, dropdown boxes, option buttons and command buttons. I was asked to change all the fonts on the form to size 12 (it was defaulted at size 9). Is there a VBA code to automatically change all the font to size 12 at the same time, instead of going into each one and changing them manually? Any guidance would be greatly appreciated. Thanks.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Automatically Change Font Sizes on Userform

    This code will do it but it doesn't change the underlying definition, only does it on activation (that is, the user will always see 12-point text but a developer will see the original 9-point when he edits the form). I don't know if there is any way to change it permanently.
    Please Login or Register  to view this content.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-21-2013
    Location
    Elkton, MD
    MS-Off Ver
    365
    Posts
    32

    Re: Automatically Change Font Sizes on Userform

    Jeff, this is perfect, however, with the form showing text at the 12 point, it is now overlapping each other and being cut off. Is there a way to fix this automatically as well, or do I need to go into the userform and manually enlarge each control?

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Automatically Change Font Sizes on Userform

    This updates the fonts and makes everything 25% bigger and spread out.
    Please Login or Register  to view this content.
    Here's another idea. You can bring up the form in the VBA window, click F4, click on the form, then hit CTRL+a. This selects all controls at once. Then on the left Properties panel you can select Font and update the size. It's manual but you do them all at once. You would still have to manually update sizes and positions, but then the code stays clean.

  5. #5
    Registered User
    Join Date
    05-21-2013
    Location
    Elkton, MD
    MS-Off Ver
    365
    Posts
    32

    Re: Automatically Change Font Sizes on Userform

    Thank you so much, Jeff! This works!

+ 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. Font and sizes
    By steven_b46 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2014, 10:33 PM
  2. [SOLVED] Help require to change the font automatically by vba code
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-25-2014, 11:44 PM
  3. [SOLVED] Change font size of UserForm checkbox
    By PDBartlett in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-20-2014, 10:35 AM
  4. Macro to convert several font sizes to another font size - with an exception
    By ddd in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-08-2012, 05:17 PM
  5. Moving Excel Charts into Word Documents: font sizes change
    By Sam in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-24-2005, 04:05 PM
  6. [SOLVED] How do I get the font color to change automatically depending on
    By gtcarlsbad in forum Excel General
    Replies: 2
    Last Post: 01-31-2005, 11:06 PM
  7. Replies: 1
    Last Post: 01-04-2005, 12:06 AM

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