Version

Add(String,Boolean,Boolean) Method

Adds a new custom view to the collection.
Syntax
'Declaration
 
Public Function Add( _
   ByVal name As String, _
   ByVal savePrintOptions As Boolean, _
   ByVal saveHiddenRowsAndColumns As Boolean _
) As CustomView

Parameters

name
The name to give the newly created custom view.
savePrintOptions
True to save print options for each worksheet with the custom view; False otherwise.
saveHiddenRowsAndColumns
True to save information about hidden rows and columns for each worksheet with the custom view; False otherwise.

Return Value

The newly created CustomView instance.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionname is a null or empty.
System.ArgumentExceptionname is the name of another custom view in the collection (custom view names are compared case-insensitively).
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also