I'm trying to look in every row in the same column in an array of spreadsheets. The module will run the sheets but not on the ones designated in the array. Not sure what I am missing...
VBA Code:
Dim ws As Worksheet
Dim Pwd As Variant
Dim UpdateView As Sheets
Set UpdateView = ActiveWorkbook.Sheets(Array("Golf Input", "Maintenance Input", "F&B Input", "G&A Input", "Summary", "Golf Summary", "Maintenance Summary", "F&B Summary", "G&A Summary"))
Pwd = InputBox("Enter password to protect all sheets", "PASSWORD REQUIRED")
If Pwd = "test123" Then
'Hide unnecessary rows
With UpdateView
For Each ws In UpdateView
LineStart = 6
ColumnNumber = 2
For i = LineStart To 250
If Cells(i, ColumnNumber).Value <> "Yes" Then
Cells(i, ColumnNumber).EntireRow.Hidden = True
Else
Cells(i, ColumnNumber).EntireRow.Hidden = False
End If
Next i
Next ws
End With