Anybody have and idea why I would get a subscript out of range error with the below piece of code. The workbook name is called CHEX. This only happens for 1 user. It does not happen for all other users. I’m really confused on what I can do to resolve this.
‘ Hide all worksheets
Dim Wks As Worksheet
For Each Wks In Workbooks(“CHEX”).Sheets
If Wks.Name “MAIN” Then
Wks.Visible = False
End If
Next Wks
I’m basically trying to hide all sheets when the work book is opened except for the main sheet. Any ideas or suggestions is appreciated.