Wednesday, October 21, 2009

Unhide hidden sheets in Excel

I am doing an Excel task using Macro. I hide most of the worksheets at the start of the Excel file, until user did some selections to show/hide certain worksheets.

Now, I am asked to allow the users to unhide the hidden worksheets in the Excel file. I have searched around in the Excel file, but failed to get so. Then I realized, I have to change how I hide the worksheet in Macro codes.

This is how I used to hide worksheet:

ThisWorkbook.Worksheets(sheetIndex).Visible = xlSheetVeryHidden

Just change xlSheetVeryHidden to xlSheetHidden will do.

Using xlSheetVeryHidden can only unhide certain worksheets in Macro.

To unhide hidden worksheets:

1. Go to Format menu.

2. Click on Sheet, then Unhide.

3. You’ll get a list of hidden worksheets, just select the worksheet name and click on OK button to unhide it.

No comments:

Post a Comment