Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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
.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Size [email protected] Excel Worksheet Functions 0 May 25th 09 08:06 AM
Screen Size [email protected] Excel Worksheet Functions 2 April 15th 09 01:53 AM
Screen Size ? Robert11[_3_] New Users to Excel 3 March 18th 09 10:43 PM
change font size on screen, but prints in old size lvrcdval Excel Discussion (Misc queries) 2 July 19th 07 02:36 PM
Work sheet size relative to screen size Florida Tom Excel Discussion (Misc queries) 1 April 16th 07 02:22 AM


All times are GMT +1. The time now is 10:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"