True (constant)

Description

Boolean constant whose value is True.

Comments

Used in conditionals and Boolean expressions.

Example

This example sets variable a to True and then tests to see whether (1) A is True; (2) the True constant = -1; and (3) A is equal to -1 (True).

Sub Main()
  a = True
  If ((a = True) and (True = -1) and (a = -1)) then
    MsgBox "a is True."
  Else
  MsgBox "a is False."
  End If
End Sub

See Also

False (constant); Constants (topic); Boolean (data type).

More information

T