Consulting

Results 1 to 2 of 2

Thread: Set Zoom with Hidden Sheets

  1. #1
    VBAX Regular
    Joined
    Aug 2006
    Posts
    36
    Location

    Set Zoom with Hidden Sheets

    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?

  2. #2
    VBAX Contributor
    Joined
    Aug 2006
    Posts
    120
    Location
    Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    ActiveWindow.Zoom = 90
    End Sub


    an idea

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •