Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I am using (trying) this code to ensure a dynically sized userform stays centred on the user's screen without a static screen size being defined. (will centre regardless of the screen size).
For the most part it works pretty slick, expect on my lap top. The userform centres horizontally, but not vertically. The top of userform (with the X) is hidden by the worksheet column header. (so I caan't access the X or move the form should I wish to).
Can anyone suggest any improvements that would eliminate this issue while still serving its intended purpose for the most part?
For the most part it works pretty slick, expect on my lap top. The userform centres horizontally, but not vertically. The top of userform (with the X) is hidden by the worksheet column header. (so I caan't access the X or move the form should I wish to).
Code:
frmservice.Top = Application.Top + (Application.UsableHeight / 2) - (frmservice.Height / 2)
frmservice.Left = Application.Left + (Application.UsableWidth / 2) - (frmservice.Width / 2)
Can anyone suggest any improvements that would eliminate this issue while still serving its intended purpose for the most part?