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
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
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.
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
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