Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Variable screen size, not resolution | Excel Worksheet Functions | |||
Excel 2003 rdp screen resolution | Excel Discussion (Misc queries) | |||
Can the screen resolution be changed within VBA? | Excel Programming | |||
Screen Area Resolution | Excel Programming | |||
How to change resolution of monitor/screen | Excel Programming |