Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Phobos,
Thank you for elaborating on J.E. McGimsey's comments. That subroutine is interesting for it demonstrates that all values except 0 are evaluated as true. And looking at J.E. McGimpsey's earlier comments, true "...coerces the boolean True to -1..." Okay, that is great to know! Again, thank you very much. Regards, Kevin "Phobos" wrote in message ... Just to clarify: In VBA, True = -1 False = 0 But, also in VBA: 0 = False <any other value = True Try this code: Sub test() Dim isFalse As Boolean Dim x As Integer For x = -20 To 20 isFalse = x Debug.Print x & " " & isFalse Next End Sub You will see in the immediate window after execution that all values except 0 return True. P |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Case ignored | Excel Worksheet Functions | |||
countif function: how to distinguish case/make case sensitive | Excel Worksheet Functions | |||
Case Select | Excel Worksheet Functions | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
Select Case | Excel Discussion (Misc queries) |