Excel vba hide sheet based on cell value
- how to hide sheet in vba
- how to hide sheets in vba excel
- how to protect sheet in vba
- how to remove sheet in vba project
How to unhide very hidden sheets in excel vba
How to hide and unhide multiple sheets in excel with vba!
Hide or Unhide Sheets Using VBA
When working with large workbooks with many worksheets, it’s common to hide some worksheets to make the workbook more manageable.
With VBA, you can easily hide or unhide worksheets in bulk.
This can also be useful when you want to quickly hide or unhide specific worksheets without having to find and locate them from a long list.
In this article, I will show you some simple VBA codes to hide or unhide sheets in Excel.
Sheet.Visible Property in VBA
VBA has the Sheet.Visible property (or Worksheet.Visible property) that determines whether it would be visible or hidden for the user in the workbook.
Below is the line of code that would hide the sheet named ‘Example’ in the workbook in which the code is run:
Worksheets("Example").Visible = FalseAnd here is the code that would unhide it (in case it is hidden):
Worksheets("Example").Visible = TrueIn this example, I have used Worksheets(“Example”), but you can use any sheet name, the active sheet, or even the Sheet object stored in a variable.
You can also use xlSh
- how to hide sheets in excel vba with password
- how to use hidden sheet in vba