AW: Bildschirmauflösung
Dieter
Hallo Frank
hier hab ich eine Lösung für Dich
die Namen und den Zoom etc. mußt Du anpassen
in der Auto_Open Anweisung ( in Diese Arbeitsmappe) mußt du noch das Makro "GetScreenSize" aufrufen
Option Explicit
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()
Dim SheetArray
Dim s
Sheets("Liste").Range("Formatanzeige") = ScreenResolution()
SheetArray = Array("Zusammenstellung", "Tab1", "Tab2", "Tab3", "Tab4") For Each s In SheetArray
If Left(Sheets("Liste").Range("Formatanzeige"), 4) = 1280 Then
Sheets(s).Activate
ActiveWindow.Zoom = 80
Else
Sheets(s).Activate
ActiveWindow.Zoom = 70
End If
Next
Sheets("Zusammenstellung").Activate
End Sub