Thread: VBA Boolean
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Andy Pope
 
Posts: n/a
Default VBA Boolean

Hi,

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

?int((10<15))

Cheers
Andy

Jeff wrote:
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?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info