ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scaling controls (https://www.excelbanter.com/excel-programming/283398-scaling-controls.html)

Chris A[_3_]

Scaling controls
 
More problems.
How can i resize all the controls on a userform to accomodate 3 different
screen resolutions. I have tried cycling through controls and scaling like
so:

For i = 1 To 5
Controls("combobox" & i).Height = Controls("combobox" & i).Height * 0.78125
Controls("combobox" & i).Width = Controls("combobox" & i).Width * 0.78125
Controls("combobox" & i).Left = Controls("combobox" & i).Left * 0.78125
Controls("combobox" & i).Top = Controls("combobox" & i).Top * 0.78125
Controls("combobox" & i).Font.Size = 9
Next i

But it's not exactly precise, things go to pot. is there something i can do
to get better scaling, I have tried something years back in VB4 using twips,
a brief encounter, can i make VBA use twips?

Any help would be apprecaited, Thanks

Chris A





All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com