CBool

Function that converts an expression into a boolean ( -1 / 0 ).

Syntax
      CBool (expression)

The keywords True and False are predefined constants and are interchangeable with the values -1 and 0, respectively.

Example

Dim boolExStaff
boolExStaff = CBool(False)

“The aim of science is not to open the door to infinite wisdom but to set a limit to infinite error” ~ Bertolt Brecht ‘Life of Galileo’

Related:

CByte - Convert to byte
CCur
- Convert to currency (number)
CDate
- Convert to Date
CDbl
- Convert to Double (number)
CInt - Convert to Integer (number)
CLng
- Convert to Long (number)

“Superstition sets the whole world in flames; philosophy quenches them” ~ Voltaire

Related:

Abs - The absolute value of a number (ignore negative sign)


 
Copyright © SS64.com 1999-2019
Some rights reserved