> Operator

Used to determine whether one alphabetic or quantitative expression is larger than another. String comparisons are case-insensitive.

# Notes

# Syntax

result=expression1 > expression2

Part | Type | Description
--- | --- | ---
result | Boolean | Returns True if expression1 is larger than expression2.
expression1 | String, Number, or Date | Any alphabetic or quantitative expression.
expression2 | String, Number, or Date | Any alphabetic or quantitative expression.

The data types of expression1 and expression2 must match.

A string is "greater than" another string if it is last when the two strings are sorted alphabetically.Use StrComp to do a case-sensitive String comparison.

You can use Operator_Compare to define comparisons for classes.

# Example

The following example tests whether one number is larger than another.

Dim a,b as Integer
If Editfield1.text <> "" and EditField2.text <> "" then
a= Val(Editfield1.text)
b= Val(EditField2.text)
If a>b then
MsgBox "A is Greater than B!"
else
Beep
end if
else
MsgBox "Please enter values into both boxes!"
end if

# See Also

>=, <, <=, =, <>, and StrComp operators; Operator_Compare function.