Application.OnPageClose Event

SharePoint Designer Developer Reference

Occurs when a page is closed.

Syntax

Private Sub expression_OnPageClose(ByVal pPage As PageWindow, Cancel As Boolean)

expression   A variable that represents an Application object that has been declared by using the WithEvents option in a class module.

Parameters

Name Required/Optional Data Type Description
pPage Required PageWindow The page to close.
Cancel Required Boolean Aborts the close operation. When Cancel is programmatically set to True, the user can abort the save process by clicking the Cancel button on the form. Default is False.

Remarks

The OnPageClose event is associated with the Application object. When the user closes a PageWindow object, the OnPageClose event fires and executes the code within the event procedure.

See Also