Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Screen resolution

I have a 30 sheet Excel package that was designed on a
monitor using 800 x 600 resolution and most sheets
have "Frozen Panes" to hide certain parts. It forces
itself into Full Screen mode for maximum use of the screen.

When it displays on a 1024 x 768 resolution monitor it
shows rows and columns that should be out of sight. I
don't want to use hide rows or columns as that makes
modifying the package more complicated.

Is there a way of detecting the screen resolution and
zooming Excel to only show what it does in 800 x 600
resolution?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Screen resolution

Hi
You can find the screen resolution with an API function:
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As
Long) As Long
Private Const SM_CXSCREEN = 0
Private Const SM_CYSCREEN = 1
Public Function GSR() As String
GSR = CStr(GetSystemMetrics(SM_CXSCREEN)) & " x " &
CStr(GetSystemMetrics(SM_CYSCREEN))
End Function
Sub show()
MsgBox "Current screen resolution is " & GSR, vbInformation
End Sub

HTH
Regards
Pascal

"Arkimediz" a écrit dans le message de
news: ...
I have a 30 sheet Excel package that was designed on a
monitor using 800 x 600 resolution and most sheets
have "Frozen Panes" to hide certain parts. It forces
itself into Full Screen mode for maximum use of the screen.

When it displays on a 1024 x 768 resolution monitor it
shows rows and columns that should be out of sight. I
don't want to use hide rows or columns as that makes
modifying the package more complicated.

Is there a way of detecting the screen resolution and
zooming Excel to only show what it does in 800 x 600
resolution?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Screen resolution

Arkimediz,

Virtually all advanced Excel programming texts explain how to use the
elementary APL GetSystemMetrics call to get the screen resolution. It takes the
form
vidWidth = GetSystemMetrics(SM_CXSCREEN)
[For the height it is
vidHeight = GetSystemMetrics(SM_CYSCREEN)]

Once I have the vidwidth I can then expand my UserForms by multiplying the Zoom
property of my UserForms by the factor vidWidth / 800

In your case you could try multiplying the column widths by the same factor.

-- Dennis Eisen
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Screen resolution

Sub Zoom2Fit()
Columns("A:H").Select
ActiveWindow.Zoom = True
End Sub

HTH. Best wishes Harald

"Arkimediz" skrev i melding
...
I have a 30 sheet Excel package that was designed on a
monitor using 800 x 600 resolution and most sheets
have "Frozen Panes" to hide certain parts. It forces
itself into Full Screen mode for maximum use of the screen.

When it displays on a 1024 x 768 resolution monitor it
shows rows and columns that should be out of sight. I
don't want to use hide rows or columns as that makes
modifying the package more complicated.

Is there a way of detecting the screen resolution and
zooming Excel to only show what it does in 800 x 600
resolution?



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
Variable screen size, not resolution Molly Excel Worksheet Functions 4 June 7th 08 12:32 AM
Excel 2003 rdp screen resolution Stefan Triep Excel Discussion (Misc queries) 0 October 15th 07 12:45 PM
Can the screen resolution be changed within VBA? DennisE Excel Programming 1 March 7th 04 12:16 AM
Screen Area Resolution CJ[_4_] Excel Programming 3 December 5th 03 12:37 AM
How to change resolution of monitor/screen Glen Mettler Excel Programming 1 November 19th 03 02:37 PM


All times are GMT +1. The time now is 07:48 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"