a conditional statement

if name <> "database" and name <> images" Then

end if


is there a better way like

if name not in (database, images) then

end if

??




--------------------------
http://www.eecpindia.com
http://www.anchorfx.com
http://forex.eecpindia.com


*** Sent via Developersdex http://www.developersdex.com ***

Re: stupid question by mayayana

mayayana
Fri May 09 22:32:52 CDT 2008


> a conditional statement
>
> if name <> "database" and name <> images" Then
>

That method works fine, if you only have the two
comparisons to make. But note that it's a binary
comparison. database is not the same as Database.
To be on the safe side it's best to do something like:

If (UCase(name) <> "DATABASE") and (UCase(name) <> "IMAGES") then...