View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Graham Whitehead Graham Whitehead is offline
external usenet poster
 
Posts: 72
Default determining resolution of current screen display

Hi, I am trying to determine the users screen resolution because the size of
charts etc, are going to be dependant on this. I have some code but for
some reason it returns 800x600 on my monitor when it should be 1280x1024.
Can anyone shed any light on this one?
Here is the code:

Sub screensize()

Dim strSize As String

With Application.DefaultWebOptions
Select Case .screensize
Case msoScreenSize800x600
strSize = "800x600"
Case msoScreenSize1024x768
strSize = "1024x768"
Case msoScreenSize1280x1024
strSize = "1280x1024"
Case Else
strSize = "1280x1024"
End Select
End With

MsgBox strSize

End Sub