View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Leo Luk[_2_] Leo Luk[_2_] is offline
external usenet poster
 
Posts: 1
Default How to get screen size ?

Thanks for your response and appreciate your help. I copy
the code and try but keep geting 0x0 (I must have done
something incorrectly). I did try the one suggested by
Tom Ogilvy and is working.

Thanks and Merry Christmas

Leo

-----Original Message-----
Declare Function GetSystemMetrics Lib "user32" (ByVal
nIndex As Long) As Long

sub test()
msgbox prompt:= GetSystemMetrics(0) & "x" &
GetSystemMetrics(1)
end

The above worked for me
-----Original Message-----
Do any one know how to obtain the screen size property

via
VBA ? (For example 1280 by 1024, 1024 by 768 ...)

I have developed an application at home but it look

aweful
when I try to run it at work because it was based on the
screen size used at home.

Help
.

.