i have an excel spreadsheet with 3 tabs one of the tabs contains formulas for one of the other sheets and i was wondering if there is a way of hiding it??
+6
A:
To hide from the UI, use Format > Sheet > Hide
To hide programatically, use the Visbility property. 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").Visibility = xlSheetVeryHidden ' or xlSheetHidden
You can also set the Visibility property through the properties pane for the worksheet in the VBA IDE (ALT+F11).
Tmdean
2009-05-12 15:16:01
+2
A:
You can do this programmatically using a VBA macro. You can make the sheet hidden or very hidden:
Sub HideSheet()
Dim sheet As Worksheet
Set sheet = ActiveSheet
' this hides the sheet but users will be able
' to unhide it using the Excel UI
sheet.Visible = xlSheetHidden
' this hides the sheet so that it can only be made visible using VBA
sheet.Visible = xlSheetVeryHidden
End Sub
0xA3
2009-05-12 15:17:50
A:
This can be done in a single line, as long as the worksheet is active:
ActiveSheet.Visible = xlSheetHidden
However, you may not want to do this, especially if you use any "select" operations or you use any more ActiveSheet operations.
A. Scagnelli
2009-05-20 15:20:46