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

  • Cancel
    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.

See Also

Reference

Microsoft.Office.Interop.Excel Namespace