AppEvents_ProtectedViewWindowBeforeCloseEventHandler delegate

Office 2013 and later

A Delegate type used to add an event handler for the ProtectedViewWindowBeforeClose event. The ProtectedViewWindowBeforeClose event occurs immediately before a Protected View window or a workbook in a Protected View window closes.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

public delegate void AppEvents_ProtectedViewWindowBeforeCloseEventHandler(
	ProtectedViewWindow Pvw,
	XlProtectedViewCloseReason Reason,
	out bool Cancel


Type: Microsoft.Office.Interop.Excel.ProtectedViewWindow

An object that represents the Protected View window that is closed.

Type: Microsoft.Office.Interop.Excel.XlProtectedViewCloseReason

A constant that specifies the reason the Protected View window is closed.

Type: System.Boolean

false when the event occurs. If the event procedure sets this parameter to true, the window does not close when the procedure is finished.