Hey everyone, hopefully someone can save the rest of my hair here.
I am trying to loop through 6 specific sheets and adjust their zoom level for displaying on a conference room TV. The code below works for the first 3 sheets wonderfully, but then errors out. If you step through it one line at a time, you can watch as it simply skips the last 3 sheets, as if they've already been done. The sheet names are definitely spelled correctly (copied directly from the tabs to be sure). I can't imagine what the heck I'm doing wrong. For now I'm just selecting each sheet individually and adjusting, but I am always trying to make my code more efficient wherever I can.
Thanks in advance!
![]()
Private Sub CommandButton3_Click() Dim ws As Worksheet, lngZoom As Long For Each ws In ThisWorkbook.Worksheets Select Case ws.Name Case "SIP Review": lngZoom = 250 Case "MOR Dashboard": lngZoom = 200 Case "Support Tickets": lngZoom = 210 Case "Overall Score": lngZoom = 260 Case "Outliers v1": lngZoom = 280 Case "Outliers v2": lngZoom = 290 End Select Application.ScreenUpdating = False With ws .Select ActiveWindow.Zoom = lngZoom End With Next ws Application.ScreenUpdating = True End Sub
Bookmarks