LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Excel Custom Function with Select Case

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Case ignored Preschool Mike Excel Worksheet Functions 4 September 9th 09 08:12 PM
countif function: how to distinguish case/make case sensitive mvwoolner Excel Worksheet Functions 3 March 18th 09 02:18 PM
Case Select NoodNutt Excel Worksheet Functions 7 September 21st 08 02:10 AM
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Select Case Jeff Excel Discussion (Misc queries) 1 February 27th 06 02:56 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"