opening excel graphs on different sized monitors

camg12

Registered User.
Local time
Today, 09:00
Joined
Jan 5, 2010
Messages
18
I have an excel file with graphs linked to another excel data file. When I open the graphs on my machine, res 1280 x 1024, they appear fine. The problem I'm having though is when I try to open on a different monitor, resolution currently set at 1360 x 768, part of the graphs get cut off. I need to be able to display the graphs on the other monitor?
 
make the graphs smaller. i would suggest so that they fit in 800 x 600.
 
Hi, camg12,

use API for finding out about the resolution of the monitor:

Code:
Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, _
    ByVal nIndex As Long) As Long
Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, _
    ByVal hdc As Long) As Long

Const HORZRES = 8
Const VERTRES = 10

Function ScreenResolution()
   Dim lRval As Long
   Dim lDc As Long
   Dim lHSize As Long
   Dim lVSize As Long
   lDc = GetDC(0&)
   lHSize = GetDeviceCaps(lDc, HORZRES)
   lVSize = GetDeviceCaps(lDc, VERTRES)
   lRval = ReleaseDC(0, lDc)
   ScreenResolution = lHSize & "x" & lVSize
End Function

Sub GetScreenSize()
   MsgBox ScreenResolution()
End Sub
and work with the zoom accordingly, or use the Zoom this way
Code:
Sub Zoom_VisibleRange()
  With Sheets(1)
    .Range("A1:D40").Select
    ActiveWindow.Zoom = True
    .Range("A1").Select
  End With
End Sub
Ciao,
Holger
 
ah. a much better answer, HaHoBe.... thanks for stepping in. i learn something (often many things) new every day.
 
Thanks for the replies. I want to be able to run it on multiple computers so the second option will probably work better. I will give it a try.
 

Users who are viewing this thread

Back
Top Bottom