+ Reply to Thread
Results 1 to 2 of 2

Why Userform Buttons Don't Match System Buttons?

  1. #1
    Registered User
    Join Date
    10-02-2007
    Posts
    12

    Why Userform Buttons Don't Match System Buttons?

    The standard dialog buttons in Windows seem to be about 55x16 pixels (width x height) with 8pt Tahoma font. However this font setting requires a button hieght of at least 18 (19 if Accelerator is used) to prevent text cropping on the bottom edge. There is no property available to change the button's textbox margins or padding. How do you get userform buttons to look like regular buttons instead of "super-sized" buttons?

  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
    Hello msleger,

    Each application defines the default size for its objects. The size chosen by Windows may not match the size chosen by the Visual Basic Editor. You can change the objects Height, Left, Top, and Width properties to resize the object. These measurements are in Points in VBA and not Pixels like in Windows. To see the Properties Page in Visual Basic Editor, press CTRL+R. Select the button you want and then change the appropriate property to change the button's size or position. Left and Top change the placement of the object relative to the upper left corner of the container that holds it. Height and Width change the objects shape.

    Sincerely,
    Leith Ross

+ 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