AppEvents_ProtectedViewWindowBeforeCloseEventHandler Delegate
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)
Syntax
'Declaration
<ComVisibleAttribute(False)> _
Public Delegate Sub AppEvents_ProtectedViewWindowBeforeCloseEventHandler ( _
Pvw As ProtectedViewWindow, _
Reason As XlProtectedViewCloseReason, _
<OutAttribute> ByRef Cancel As Boolean _
)
'Usage
Dim instance As New AppEvents_ProtectedViewWindowBeforeCloseEventHandler(AddressOf HandlerMethod)
[ComVisibleAttribute(false)]
public delegate void AppEvents_ProtectedViewWindowBeforeCloseEventHandler(
ProtectedViewWindow Pvw,
XlProtectedViewCloseReason Reason,
out bool Cancel
)
Parameters
Pvw
Type: Microsoft.Office.Interop.Excel.ProtectedViewWindowAn object that represents the Protected View window that is closed.
Reason
Type: Microsoft.Office.Interop.Excel.XlProtectedViewCloseReasonA constant that specifies the reason the Protected View window is closed.
Cancel
Type: System.Booleanfalse when the event occurs. If the event procedure sets this parameter to true, the window does not close when the procedure is finished.