SpreadsheetLayouts.Add

This function adds a spreadsheet layout by the specified name.

Syntax Parameters Return Value
Function SpreadsheetLayouts.Add( _
    LayoutName As String, _
    Optional AddOption As Integer = 0) As SpreadsheetLayout
  • LayoutName [in]

The name of the new Spreadsheet Layout.

Type: String

  • AddOption [in,optional]

Type: Integer

Default value: 0

SpreadsheetLayout

SVB Example

Adding and removing custom layouts:

Option Base 1
Option Explicit
Sub Main
    'create a new spreadsheet layout entitled "New Layout"
    SpreadsheetLayouts().Add("NEW Layout",True)
    'remove the Spreadsheet "New Layout"
    SpreadsheetLayouts().Remove("NEW Layout")
End Sub