Returns the expression converted to a boolean data type (Boolean).

expressionThe expression to evaluate and convert to a boolean.

* This function will convert any numerical value into a boolean value.
* The "expression" can be any valid string or numeric expression.
* If the expression passed to the function is outside the range of the data type being converted to, an error occurs.
* Numeric non-zero values are converted to True.
* The strings "True" and "False" are converted to True and False respectively.
* For the Microsoft documentation refer to docs.microsoft.com

CBool(1) = True 
CBool(0) = False
CBool(-1) = True
CBool("0") = False
CBool("1") = True
CBool("-1") = True
CBool(100) = True
CBool(-100) = True
CBool("some text") = Type mismatch

© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited Top