yyyymmdd date format
As in many other languages, in VBA, when coercing numbers to a boolean
value, zero is evaluated as False, any non-zero value will be evaluated
as True.
A True value in VBA will be coerced to -1 in a math operation. In XL,
the coercion is to +1.
In article ,
"NickHK" wrote:
Rob,
The Excel v. VBA handling of booleans seems a bit screwy. Assuming A1=TRUE:
?range("A1").Value=true
True
?-range("A1").Value=true
False
?--range("A1").Value=true
True
?10*range("A1").Value
-10
?10*--range("A1").Value
-10
I can't see the logic for all the above to be valid.
|