Dictionary.CompareMode Property (VB6)

Syntax

dictionaryobject.CompareMode [= CompareMethodConst]

dictionaryobject

Use: Required

Data Type: Dictionary object

A reference to a Dictionary object.

CompareMethodConst

Use: Optional when returning, required when setting

Data Type: Numeric constant

Acceptable values for CompareMode are BinaryCompare (0, Binary), TextCompare (1, Text), and DatabaseCompare (2, Database). Values greater than 2 refer to comparisons using specific locale IDs (LCIDs).

Property Data Type

Numeric enumeration (CompareMethod constant).

Description

Sets or returns the mode used to compare the keys in a Dictionary object. The CompareMode setting is used by StrComp, the string comparison function.

Rules at a Glance

  • CompareMode can be set only on a dictionary that doesn't contain any data.

  • You need to explicitly set the CompareMode property only if you don't wish to use the default binary comparison mode.

Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.