Export (0) Print
Expand All

Workbook.Startup Event

Occurs after the workbook is running and all the initialization code in the assembly has been run.

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

public event EventHandler Startup

The last thing to run in the constructor of the class that the user code is running in. Use this event for any additional initialization.

The following code example demonstrates a handler for the Startup event that displays a message when the workbook has been initialized.

private void WorkbookStartup()
    this.Startup += new EventHandler(ThisWorkbook1_Startup);

void ThisWorkbook1_Startup(object sender, EventArgs e)
    MessageBox.Show("The workbook is starting up");

© 2015 Microsoft