I am following up my earlier question where I opted to go with a function and built a list of names of worksheets that are exception to the task being performed
Function exception(Sheet_Name As String) As Boolean
Dim exceptions(3) As String
Dim Counter_x As Long
exceptions(0) = "MASTER ITEM LIST"
exceptions(1) = "ITEM LIST"
exceptions(2) = "Rebar Protperties"
exceptions(3) = "Rebar Worksheet"
exception = False
For Counter_x = LBound(exceptions) To UBound(exceptions)
If Sheet_Name = exceptions(Counter_x) Then
exception = True
End If
Next Counter_x
End Function
In this approach the worksheet names are hard coded. I also took an approach at one point for an exception being worksheet("blah").index > 2
. Using the index number seems like a bad idea as the worksheet can be moved around which would change its index number. Hard coding the worksheet name in the list also seems like a poor choice as the worksheet name could be renamed.