Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Worksheet.Startup Event

Occurs after the worksheet 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.

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

private void WorksheetStartup()
{
    this.Startup += new EventHandler(Worksheet1_Startup);
}

void Worksheet1_Startup(object sender, EventArgs e)
{
    MessageBox.Show(this.Name + " is starting up.");
}

Show:
© 2015 Microsoft