title: Userform resizing according to screen resolution
body: <p>I have an Excel userform I want to resize on opening to fit the screen resolution.</p>
  
  <p>I get the height and the width through <code>Application.Height</code> and <code>Application.Width</code>, and normally with these two parameters and the following code, one should do the trick: </p>
  
  <pre><code>Me.Top = Application.Top
  Me.Left = Application.Left
  Me.Height = Application.Height
  Me.Width = Application.Width
  </code></pre>
  
  <p>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.</p>
  
  <p><a href="https://i.stack.imgur.com/KkLFh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KkLFh.png" alt="Screen resolution"></a></p>
  
  <p>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.</p>
  
  <p>How can I retrieve the Desktop zoom parameter?</p>