Sub a()
Dim S As String
S = "WindowState = "
Select Case Application.WindowState
Case xlMaximized
S = S & "xlMaximized"
Case xlMinimized
S = S & "xlMinimized"
Case xlNormal
S = S & "xlNormal"
Case Else
S = S & "Inconnu"
End Select
S = S & vbCrLf & vbCrLf & _
"ActiveWindow:" & vbCrLf
With ActiveWindow
S = S & _
"Left: " & .Left & ", Top: " & .Top & ", Width: " & .Width & ", Height: " & .Height & vbCrLf & _
"UsableWidth: " & .UsableWidth & ", UsableHeight: " & .UsableHeight
End With
S = S & vbCrLf & vbCrLf & _
"Application:" & vbCrLf
With Application
S = S & _
"Left: " & .Left & ", Top: " & .Top & ", Width: " & .Width & ", Height: " & .Height & vbCrLf & _
"UsableWidth: " & .UsableWidth & ", UsableHeight: " & .UsableHeight
End With
MsgBox S
End Sub