Because it's wrong.
Wrong:
Code:
if i = 0 then
GETTRUEFALSE = FALSE
else
if i < 2 then GETTRUEFALSE = TRUE
else
if i = 3 then GETTRUEFALSE = FALSE
end if
Right (faster)
Code:
Select Case i
Case 0: GetTrueFalse = False
Case < 2: GetTrueFalse = True
Case 3: GetTrueFalse = False
End Select
Should work if you have i as in integer (Dim as integer) if you're using VB6 but if you're not youll need to convert it to an integer by doing:
int(i)
So change:
Hope it helps