Export (0) Print
Expand All

Workbook.New Event

Occurs when a new workbook is created.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public event WorkbookEvents_NewEventHandler New

The following code example demonstrates a handler for the New event. The event handler maximizes the Microsoft Office Excel application window when a new workbook is created.

private void WorkbookNew()
    this.New +=
        new Microsoft.Office.Tools.Excel.WorkbookEvents_NewEventHandler(

void ThisWorkbook_New()
    this.Application.WindowState = Excel.XlWindowState.xlMaximized;

© 2015 Microsoft