CustomViews.Add Method (Excel)

Creates a new custom view.


expression. Add( _ViewName_ , _PrintSettings_ , _RowColSettings_ )

expression A variable that represents a CustomViews object.


Name Required/Optional Data Type Description
ViewName Required String The name of the new view.
PrintSettings Optional Variant True to include print settings in the custom view.
RowColSettings Optional Variant True to include settings for hidden rows and columns (including filter information) in the custom view.

Return Value

A CustomView object that represents the new custom view.


This example creates a new custom view named "Summary" in the active workbook.

ActiveWorkbook.CustomViews.Add "Summary", True, True

See also

CustomViews Object