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 uninstalled 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 AddinUninstall As WorkbookEvents_AddinUninstallEventHandler
'Usage
Dim instance As Workbook
Dim handler As WorkbookEvents_AddinUninstallEventHandler
AddHandler instance.AddinUninstall, handler
public event WorkbookEvents_AddinUninstallEventHandler AddinUninstall
public:
event WorkbookEvents_AddinUninstallEventHandler^ AddinUninstall {
void add (WorkbookEvents_AddinUninstallEventHandler^ value);
void remove (WorkbookEvents_AddinUninstallEventHandler^ value);
}
JScript does not support events.
Remarks
The add-in does not automatically close when it is uninstalled.
Examples
The following code example demonstrates a handler for the AddinUninstall event. The event handler minimizes Microsoft Office Excel when the workbook is uninstalled as an add-in.
This example is for a document-level customization.
Sub ThisWorkbook_AddinUninstall() Handles Me.AddinUninstall
Me.Application.WindowState = Excel.XlWindowState.xlMinimized
End Sub
private void WorkbookAddinUninstall()
{
this.AddinUninstall +=
new Excel.WorkbookEvents_AddinUninstallEventHandler(
ThisWorkbook_AddinUninstall);
}
void ThisWorkbook_AddinUninstall()
{
this.Application.WindowState = Excel.XlWindowState.xlMinimized;
}
.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.