Answers for "userform startup position multiple monitors"

0

userform startup position multiple monitors

Private Sub UserForm_Initialize()
  'PURPOSE: Position userform to center of Excel Window (important for dual monitor compatibility)
  'Start Userform Centered inside Excel Screen (for dual monitors)
  Me.StartUpPosition = 0
  Me.Left = Application.Left + (0.5 * Application.Width) - (0.5 * Me.Width)
  Me.Top = Application.Top + (0.5 * Application.Height) - (0.5 * Me.Height)
End Sub
Posted by: Guest on July-05-2020

Browse Popular Code Answers by Language