Guest User

Untitled

a guest
Dec 15th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Private Sub HighlightForm_Activate()
  2.  
  3. With HighlightForm
  4. .StartUpPosition = 0
  5. .Left = Application.Left + (0.5 * Application.Width) - (0.5 * .Width)
  6. .Top = Application.Top + (0.5 * Application.Height) - (0.5 * .Height)
  7. .Show
  8. End With
  9.  
  10. End Sub
  11.  
  12. Private Sub UserForm_Activate()
  13. 'Position top/left of Excel App
  14. Me.Top = Application.Top
  15. Me.Left = Application.Left
  16.  
  17. 'Approx over top/left cell (depends on toolbars visible)
  18. Me.Top = Application.Top + (Application.UsableHeight / 2)
  19. Me.Left = Application.Left + (Application.UsableWidth / 2)
  20. End Sub
Add Comment
Please, Sign In to add comment