Giordano Bruno
Well-known Member
- Joined
- Jan 7, 2007
- Messages
- 1,352
Hi all. Can someone show me how to get the screen metrics when using a 64bit version of Excel i.e. where do I use "long" and where do I use
Private Declare PtrSafe Function GetSystemMetrics Lib "user32" (ByVal Index As Long) As Long
Private Const SM_CXSCREEN As Long = 0
Private Const SM_CYSCREEN As Long = 1
Public Sub ShowScreenDimensions()
Dim X As Long
Dim Y As Long
X = GetSystemMetrics(SM_CXSCREEN)
Y = GetSystemMetrics(SM_CYSCREEN)
End Sub