•1 min read•from Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community
My VBA Loop Fails Due to Hidden Tabs. Any Advice To Fix This?
Hi,
I have the below VBA loop that does the following to each visible tab in a Workbook: (i) Go to cell A1 & (ii) Change Zoom to 100%. The VBA work fine unless there is a hidden tab. If there is a hidden tab the code fails. How do I ignore the hidden tabs? I want to just use the code on the visible tabs.
TY!
Sub Format()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
Application.Goto Range("A1"), True
ActiveWindow.Zoom = 100
Next ws
End Sub
[link] [comments]
Want to read more?
Check out the full article on the original site
Tagged with
#Excel alternatives for data analysis
#no-code spreadsheet solutions
#rows.com
#natural language processing for spreadsheets
#generative AI for data analysis
#Excel compatibility
#Excel alternatives
#VBA
#hidden tabs
#loop
#visible tabs
#Workbook
#worksheet
#Excel
#zoom
#cell A1
#code
#Format
#Application.Goto
#ActiveWindow