This documentation is archived and is not being maintained.

Hidden Worksheets

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005


    Visual Studio Team System

  • Microsoft Office 2003

Microsoft Office Excel 2003 worksheets that are formatted as hidden are not visible in the Visual Studio designer, but they are visible in Solution Explorer. Double-clicking the sheet in Solution Explorer opens the code file for the sheet, instead of opening the visual designer.

Hiding a Worksheet Programmatically

You can hide worksheets programmatically so that they are visible in the visual designer, but are not visible when the solution runs, by using the worksheet property xlSheetHidden or xlSheetVeryHidden. For example, you can put this code in the code file behind the sheet you want to hide:

this.Visible = Excel.XlSheetVisibility.xlSheetVeryHidden;

The property xlSheetHidden hides the sheet, but it can be made visible by any user through the Excel user interface. If you use xlSheetVeryHidden, however, the user cannot make the sheet visible through the Excel user interface.

See Also