This bit at the top of a module (the declarations section):
Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
This bit anywhere in a standard code module:
Sub DisplayVideoInfo()
vidWidth = GetSystemMetrics(SM_CXSCREEN)
vidHeight = GetSystemMetrics(SM_CYSCREEN)
Msg = "The current video mode is: "
Msg = Msg & vidWidth & " X " & vidHeight
MsgBox Msg
End Sub
I don't know how to set the screen resolution/video mode from vba; I
suspect it's difficult. How about using the above information to set
window sizes, form sizes, zoom levels etc.