I have an Excel userform I want to resize on opening to fit the screen resolution.
I get the height and the width through Application.Height and Application.Width, and normally with these two parameters and the following code, one should do the trick:
Me.Top = Application.Top
Me.Left = Application.Left
Me.Height = Application.Height
Me.Width = Application.Width
Here is the problem: Windows (at least since 7) has a parameter to set the zoom on the desktop, and this seems to compromise the code.
When changing from 100% to 150% for example, the form's width and height are set correctly but the zoom isn't. I'd like to change it according to Windows desktop zoom.
How can I retrieve the Desktop zoom parameter?
