Visible Property [Excel 2003 VBA Language Reference]

Visible property as it applies to the ChartFillFormat, FillFormat, LineFormat, ShadowFormat, Shape, ShapeRange, and ThreeDFormat objects.

MsoTriState

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse
msoTriStateMixed
msoTriStateToggle
msoTrue The object is visible.

expression.Visible

expression Required. An expression that returns one of the above objects.

Visible property as it applies to the Chart and Worksheet objects.

XlSheetVisibility

XlSheetVisibility can be one of these XlSheetVisibility constants.
xlSheetHidden
xlSheetVisible
xlSheetVeryHidden Hides the object so that the only way for you to make it visible again is by setting this property to True (the user cannot make the object visible).

expression.Visible

expression Required. An expression that returns one of the above objects.

Visible property as it applies to the Application, ChartObject, ChartObjects, Comment, Name, OLEObject, OLEObjects, Phonetic, Phonetics, PivotItem, and Window objects.

Determines whether the object is visible. Read/write Boolean.

expression.Visible

expression Required. An expression that returns one of the above objects.

Visible property as it applies to the Charts, Sheets, and Worksheets objects.

Determines whether the object is visible. Read/write Variant.

expression.Visible

expression Required. An expression that returns one of the above objects.

Remarks

The Visible property for a PivotTable item is True if the item is currently visible in the table.

If you set the Visible property for a name to False, the name won't appear in the Define Name dialog box.

Example

As it applies to the Chart and Worksheet objects.

This example hides Sheet1.

Worksheets("Sheet1").Visible = False

This example makes Sheet1 visible.

Worksheets("Sheet1").Visible = True

This example makes every sheet in the active workbook visible.

For Each sh In Sheets
 sh.Visible = True
Next sh

This example creates a new worksheet and then sets its Visible property to xlVeryHidden. To refer to the sheet, use its object variable, newSheet, as shown in the last line of the example. To use the newSheet object variable in another procedure, you must declare it as a public variable (Public newSheet As Object) in the first line of the module preceding any Sub or Function procedure.

Set newSheet = Worksheets.Add
newSheet.Visible = xlVeryHidden
newSheet.Range("A1:D4").Formula = "=RAND()"

Applies to | Application Object | Chart Object | ChartFillFormat Object | ChartObject Object | ChartObjects Collection Object | Charts Collection | Comment Object | FillFormat Object | LineFormat Object | Name Object | OLEObject Object | OLEObjects Collection Object | Phonetic Object | Phonetics Collection Object | PivotItem Object | ShadowFormat Object | Shape Object | ShapeRange Collection | Sheets Collection Object | ThreeDFormat Object | Window Object | Worksheet Object | Worksheets Collection