Returns an expression that has been converted to type Boolean.
CBool(expression As Variant) As Boolean
b = CBool(expression)
|expression||(Variant) Any valid expression.|
If expression is zero, false is returned; otherwise, true is returned. If expression can't be interpreted as a numeric value, a runtime error occurs.
A = 5: B = 5
Check = CBool(A=B) 'Check contains true
A = 0
Check = CBool(A) 'Check contains false