The code below shows you a simple, but not always obvious way to calculate the size of the screen, and therefore its resolution.
Private Sub cmdGetRes_Click()
Dim iWidth As Integer
Dim iHeight As Integer
iWidth = Screen.Width / Screen.TwipsPerPixelX
iHeight = Screen.Height / Screen.TwipsPerPixelY
MsgBox iWidth & " x " & iHeight
End Sub
Comments