WorkbookBase.AddinInstall-Ereignis

Tritt ein, wenn die Arbeitsmappe als Add-In installiert wird.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Syntax

'Declaration
Public Event AddinInstall As WorkbookEvents_AddinInstallEventHandler
public event WorkbookEvents_AddinInstallEventHandler AddinInstall

Beispiele

Im folgenden Codebeispiel wird ein Handler für das AddinInstall-Ereignis veranschaulicht.Durch den Ereignishandler wird Microsoft Office Excel maximiert, wenn die Arbeitsmappe als Add-In installiert ist.

Dieses Beispiel bezieht sich auf eine Anpassung auf Dokumentebene.

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

void ThisWorkbook_AddinInstall()
{
    this.Application.WindowState = Excel.XlWindowState.xlMaximized;
}

.NET Framework-Sicherheit

Siehe auch

Referenz

WorkbookBase Klasse

Microsoft.Office.Tools.Excel-Namespace