Freigeben über


WorkbookBase.AddinInstall Event

Definition

Occurs when the workbook is installed as an add-in.

public:
 event Microsoft::Office::Interop::Excel::WorkbookEvents_AddinInstallEventHandler ^ AddinInstall;
public event Microsoft.Office.Interop.Excel.WorkbookEvents_AddinInstallEventHandler AddinInstall;
member this.AddinInstall : Microsoft.Office.Interop.Excel.WorkbookEvents_AddinInstallEventHandler 
Public Custom Event AddinInstall As WorkbookEvents_AddinInstallEventHandler 

Event Type

Examples

The following code example demonstrates a handler for the AddinInstall event. The event handler maximizes Microsoft Office Excel when the workbook is installed as an add-in.

This example is for a document-level customization.

private void WorkbookAddinInstall()
{
    this.AddinInstall +=
        new Excel.WorkbookEvents_AddinInstallEventHandler(
        ThisWorkbook_AddinInstall);
}

void ThisWorkbook_AddinInstall()
{
    this.Application.WindowState = Excel.XlWindowState.xlMaximized;
}
Sub ThisWorkbook_AddinInstall() Handles Me.AddinInstall
    Me.Application.WindowState = Excel.XlWindowState.xlMaximized
End Sub

Applies to