I am looking to get advice on how to run a line of vba at the end of what I have built that will run through every sheet regardless if its hidden or not to reset the zoom level and scroll to the top of each page then return to the first page. I've tried several parts of code from google suggestions and it either throws an error or doesn't perform the function. Any advice is appreciated!
Sub Blankout_FAA()
'
' Blankout_FAA Macro
'
' First Few Pages Clear
Sheets("CvrPg").Select
Range("P34:AC35,P38:AC39,P42:AC43").ClearContents
Sheets("Tech").Select
Range("O36,O37,Z36,Z37").ClearContents
Sheets("Eqpt").Select
Range("Z19,Z21,J23:Z23,Q27,Z30,Z31,Z35,Z36,Z40:Z44").ClearContents
Sheets("Defs").Select
Range("B11:AC33").ClearContents
' Device Clearout
Dim shExclude
Dim ws As Worksheet
shExclude = Array("CvrPg", "Tech", "Bldg", "Eqpt", "PS1", "PS2", "PS3", "PS4", "PS5", "PS6", "Defs")
For Each ws In ActiveWorkbook.Worksheets
If IsError(Application.Match(ws.Name, shExclude, 0)) Then
ws.Range("V11:AC44").ClearContents
End If
Next
' Power Supply Clear
Dim Sh As Worksheet
For Each Sh In Sheets
If Sh.Name = "PS1" Or Sh.Name = "PS2" Or Sh.Name = "PS3" Or Sh.Name = "PS4" Or Sh.Name = "PS5" Or Sh.Name = "PS6" Then
With Sh
.Range("V12:Y43,AC12:AC43").ClearContents
End With
End If
Next
Sheets("CvrPg").Select
End Sub
Bookmarks