I have an Excel spreadsheet with three sheets. One of the sheets contains formulas for one of the other sheets.
Is there a programmatic way to hide the sheet which contains these formulas?
To hide from the UI, use Format > Sheet > Hide
To hide programatically, use the Visible
property of the Worksheet
object. If you do it programatically, you can set the sheet as "very hidden", which means it cannot be unhidden through the UI.
ActiveWorkbook.Sheets("Name").Visible = xlSheetVeryHidden
' or xlSheetHidden or xlSheetVisible
You can also set the Visible property through the properties pane for the worksheet in the VBA IDE (ALT+F11).