What am I doing wrong in this code? Its part of a longer code, but the error is in here. It runs ok until Sheetx.Visible = False, if substitute sheet101.visible it works, why?
It looks a bit messy because I've been trying to debug it!
![]()
If ac = 1 Then For Each ws In ActiveWorkbook.Worksheets 'ws.Visible = xlSheetVisible Next ws x = 101 Sheetx.Visible = False End If
Bookmarks