PDA

View Full Version : Set Zoom with Hidden Sheets



ajrob
09-08-2006, 04:26 PM
I'm trying to set zoom for all sheets in a workbook to 90%. Some sheets start in a hidden state. I've tried the following:

Private Sub Workbook_Open()
Application.ScreenUpdating = False

' Set Excel Window to Maximize
Application.WindowState = xlMaximized

' Set Window Zoom to 90% for all Sheets
Sheets("Utilities").Select
ActiveWindow.Zoom = 90
Sheets("Notes").Select
ActiveWindow.Zoom = 90
Sheets("Main Form").Select
ActiveWindow.Zoom = 90
Sheets("Liquid Fuel Analysis").Select
ActiveWindow.Zoom = 90
Sheets("Consumption Estimator").Select
ActiveWindow.Zoom = 90
Sheets("Site PFD - Low").Select
ActiveWindow.Zoom = 90

' Program opens with Main Form sheet
Application.Goto Reference:=Range("ind_Main_Form"), Scroll:=True

End Sub

but get an error message that I've traced down to trying to set zoom using ActiveWindow on a hidden sheet. Can you show me another way?

makako
09-08-2006, 04:38 PM
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ActiveWindow.Zoom = 90
End Sub


an idea