I am writing a VBA macro to reset certain regions of a calculation workbook that I frequently use. My calculate macro hides irrelevant sheets when it runs. I want the reset macro to make all the sheets visible. So, I wrote this code:
For Each ws In ActiveWorkbook.Sheets
ws.Visible = True
Next ws
But, when I run it, it always errors out on a specific worksheet. The exact error message is this:
What am I doing wrong? The workbook does contain some "chart" worksheets. But, I am getting the error for a standard worksheet. I also don't have dim ws as Worksheet
because then it cannot work with chart sheets.