QueryClose Constants

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

The following constants can be used anywhere in your code in place of the actual values:

Constant

Value

Description

vbFormControlMenu

0

The user chose the Close command from the Control menu on the form.

vbFormCode

1

The Unload statement is invoked from code.

vbAppWindows

2

The current Microsoft Windows operating environment session is ending.

vbAppTaskManager

3

The Windows Task Manager is closing the application.

Show: