Occurs when the worksheet host item shuts down.
Assemblies: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
In a document-level customization, the application domain for the assembly unloads when the worksheet host item shuts down.
In an application-level add-in, the application domain does not unload when the worksheet host item shuts down. Also, the underlying worksheet object is no more available. To access the worksheet before it shuts down use BeforeClose instead.
- 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.