Hide Unhide Worksheet Using Excel VBA | Excel VBA Automation

Hide Unhide Worksheet
  • Save

Introduction/Problem Statement/Business Need:

This article is to Hide Unhide Worksheet Using Excel VBA code.

In any case, the user would like to Hide Unhide Worksheet without manual intervention.

Solution:

Hide Unhide Worksheet using VBA:

There are two levels of worksheet hiding: Hidden and Very hidden

There are two methods to hide the worksheet in VBA

1. Set the visible property to xlSheetHidden:

Hide Sheet using VBA
  • Save

2. Set the Visible property to FALSE:

Set the Visible property to FALSE
  • Save

These hidden sheets are easily unhid by right click any visible worksheet, click unhide, and select the sheet that we want to see.

Unhide Sheets
  • Save

Read:- How to Delete Worksheet in Excel Using VBA

Unhide sheet:

Unhiding the sheet that was hidden normally is very easy.

1. Set the Visible property to TRUE:

Unhide Sheet
  • Save

2. Set the visible property to xlSheetVisible

Set the visible property
  • Save

Very hidden worksheet:

Set sheet visible property to xlSheetVeryHidden.

Very hidden worksheet
  • Save

If the workbook contains only very hidden sheets, we won’t even be able to open the Unhide dialog box because the Unhide command will be disabled.

Unhide Very Hidden Sheets

There are two way of unhiding very hidden sheets

1. Set the Visible property to TRUE:

Unhide Very Hidden Sheets
  • Save

2. Set the visible property to xlSheetVisible

Hide All Sheet Except the one sheet i.e ‘Master’ sheet

Use the Below code to hide all sheets off the active workbook  except the ‘master’ sheet

Hide All Sheet
  • Save

Read:- Learn How to Clear Worksheet Using Excel VBA

Unhide All Sheet Except the one sheet i.e ‘Master’ sheet

Use the Below code to Unhide all sheets of the active workbook except the ‘master’ sheet

Unhide All Sheet
  • Save

Conclusion

If you want to Hide Unhide Worksheet in a workbook then you may use any of the above code instead of manually doing it.

Don't miss out!
Subscribe To Newsletter

Get the latest Excel, VBA, Automation, Tips & Tricks, delivered straight to your inbox.

Invalid email address
Give it a try. You can unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copy link
Powered by Social Snap