VBA Boolean

J

Jeff

Hi

In VBA I set

X = (J<15)*8

where J=10, so the statement is true, but "X" is set = to "-8"
if True = 1 why is the 8 negative?
 
A

Andy Pope

Hi,

Because TRUE, in this case, equates to -1
Try this in the immediate window.

?int((10<15))

Cheers
Andy
 
Top