Event fired before the workspace is closed.

Syntax:

BeforeCloseWorkspace(Workspace As Workspace, Cancel As ReturnBoolean)
Parameters: Workspace Workspace that will be closed.
Cancel False: No cancellation of the close process. The workspace will be closed. True: Close process will be canceled. The workspace will not be closed.

Example:
' in a class module "EventClass"

Dim WithEvents App As Application

Private Sub App_BeforeCloseWorkspace(ByVal Workspace As Workspace, _
	ByVal Cancel As ReturnBoolean)
 
[...]

End Sub

' in a module

Public EventManager As New EventClass

Sub TestMacro()
	Set EventManager.App = Application
End Sub

See also:

Class Application

Last Updated: 04/26/05