View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Preset Display Setting in Auto Open

You can only use one Auto_open macro in a workbook
copy the code you need from your old Auto_open in a normal sub and
run this sub from your Auto_open macro.

See below

Sub Auto_Open()
Dim strResolution As String
Dim zoomnumber As Integer
Dim sh As Worksheet
strResolution = DisplayVideoResolution
If strResolution = "1024 x 768" Then
zoomnumber = 100
ElseIf strResolution = "800 x 600" Then
zoomnumber = 75
ElseIf strResolution = "640 x 480" Then
zoomnumber = 50
End If
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
sh.Select
ActiveWindow.zoom = zoomnumber
Next
ThisWorkbook.Worksheets(1).Select
Application.ScreenUpdating = True

YourMacroName

End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Phil Hageman" wrote in message ...
That's true - what do I do?