Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Occurs when the workbook is installed as an add-in.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public Event AddinInstall As WorkbookEvents_AddinInstallEventHandler
'Usage
Dim instance As Workbook
Dim handler As WorkbookEvents_AddinInstallEventHandler
AddHandler instance.AddinInstall, handler
public event WorkbookEvents_AddinInstallEventHandler AddinInstall
public:
event WorkbookEvents_AddinInstallEventHandler^ AddinInstall {
void add (WorkbookEvents_AddinInstallEventHandler^ value);
void remove (WorkbookEvents_AddinInstallEventHandler^ value);
}
JScript does not support events.
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.
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 Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.