I am using the following code to hide and unhide specifc worksheets within a single macro, once I have it working I will seperate the hide and unhide
to unhide worksheets ("RFQ") is never hidden so I want to skip by that sheet
Dim ws As Worksheet (declared once for both Loops)
For Each ws In ActiveWorkbook.Worksheets
If InStr("RFQ Supplier", ws.Name) = 0 Then
' your code here
ws.Visible = xlSheetVisible
End If
Next ws
the following code will hide all the sheets but one and return an error
I want to hide worksheets except ("RFQ") but that is not happening
For Each ws In ActiveWorkbook.Worksheets
On Error Resume Next (inserted this and it seems to resolve my error window - likely you can't hide all the sheets in a workbook)
If InStr("RFQ Supplier", ws.Name) = 0 Then
' your code here
ws.Visible = xlSheetVeryHidden
End If
Next ws
Have tried a few alternatives but going around in circles at present, used a
any suggestions would be appreciated Thanks
Bookmarks