Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get screen size ?
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get screen size ?
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 . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get screen size ?
It is pretty much the same as the third piece of code i gave you:
Declare Function GetSystemMetrics Lib "user32" _ (ByVal nIndex As Long) As Long Sub test() MsgBox prompt:=GetSystemMetrics(0) _ & "x" & GetSystemMetrics(1) End Sub Worked for me. Probably a word wrap problem. -- Regards, Tom Ogilvy "Leo Luk" wrote in message ... 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 . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Screen Size | Excel Worksheet Functions | |||
Screen Size | Excel Worksheet Functions | |||
Screen Size ? | New Users to Excel | |||
change font size on screen, but prints in old size | Excel Discussion (Misc queries) | |||
Work sheet size relative to screen size | Excel Discussion (Misc queries) |