StrComp

concerns

The StrComp function compares the two specified strings.

 

Syntax

StrComp(Expr1, Expr2, Compare)

Return value

Type

Description

Long

Result of the comparison

Parameter

Use

Name

Type

Passing

Description

Required

Expr1

String

ByVal

First comparative string

Required

Expr2

String

ByVal

Second comparative string

Required

Compare

StrCompOption

ByVal

Type of string comparison

 

Possible return values can be:

 

Return value

Description

-1

Expr1 is in alphabet ahead of Expr2

0

Expr1 and Expr2 are the same

1

Expr2 is in alphabet ahead of Expr1

 

StrCompOption

Description

0

Binary comparison

1

Text-based comparison (case not included)