Results 1 to 5 of 5

Thread: Excel Forms - Sizing controls

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2010
    Posts
    1,462

    Excel Forms - Sizing controls

    Hi,
    I've asked this question before but never recieved a solution. Maybe there's not one?

    Occasionally the font on a control (label, list box) appears in the wrong size.
    It can usually be fixed by re-applying the font or control size; or slightly adjusting Top or Height.

    But in order to realise it's wrong, you have to first see it. (By which time it's too late).

    I'm refering to a Form where controls are built on the fly, so the adjustment
    cannot be made at design time.

    Nor should everything be applied twice just in case (although I am doing this
    and it fixes much of it).

    Does anyone know if any clever techniqe or API call can determine what font size Excel actually DID use? Or when the size is not what Excel says it is.

    Thanks, ABB

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Excel Forms - Sizing controls

    Why not save yourself all the trouble of using API for such trivial issue? Declare the font and the font size in the code itself when you create the control at runtime?

    Sid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2010
    Posts
    1,462

    Re: Excel Forms - Sizing controls

    Sorry, you misunderstand. That is done.

    Regardless the problem occurs - intermittently.

    So it seems an Excel issue, I suspect because of a bug where the size and
    positioning just 'don't work right'.

    Have you never seen this ? It can also happen in design mode but it's easy to fix there. But not when the Form and controls are created at run time. You can't know in advance when it will happen - to fix it.

    That's the problem I'm seeking a solution for.

  4. #4
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Excel Forms - Sizing controls

    I see. However I have never come across this problem. Do you have any screenshots that I can see?

    Sid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2010
    Posts
    1,462

    Re: Excel Forms - Sizing controls

    The screenshot would just show e.g. a label with what looks like
    a font that's too big, or doesn't fit properly.

    Let me make an actual example? If I can... cut back to the bare minimum
    of code to create the same 'error'. It may take me a day or so.

    Thanks, ABB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width