Comparison 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 are defined in the Visual Basic for Applications type library and can be used anywhere in your code in place of the actual values:

Constant

Value

Description

vbUseCompareOption

-1

Performs a comparison using the setting of the Option Compare statement.

vbBinaryCompare

0

Performs a binary comparison.

vbTextCompare

1

Performs a textual comparison.

vbDatabaseCompare

2

For Microsoft Access (Windows only), performs a comparison based on information contained in your database.

Show: