- Operator

[This is preliminary documentation and subject to change.] 

Used to find the difference between two numbers or to indicate the negative value of a numeric expression.

Syntax 1

result = number1-number2

Syntax 2

-number

The - operator syntax has these parts:

Part Description
result Required; any numeric variable.
number Required; any numeric expression.
number1 Required; any numeric expression.
number2 Required; any numeric expression.

Remarks

In Syntax 1, the - operator is the arithmetic subtraction operator used to find the difference between two numbers. In Syntax 2, the - operator is used as the unary negation operator to indicate the negative value of an expression.

Example

MyResult = 4 - 2 ' Returns 2.
MyResult = 459.35 - 334.90 ' Returns 124.45.