a really noob question :(

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I hate to even ask it, but im trying to make a statement that says
"does not equal" or !=, but i cant figure out how :(. i cant just put

if a != b then

end if

thank you in advance
 
if a <> b then

end if


or use the NOT operator to invert any boolean expression, eg:


if not a=b then

end if
 
but im trying to make a statement that says
"does not equal" or !=, but i cant figure out how :(. i cant just put

if a != b then

To compare values:

\\\
If a <> b Then...
///

If you want to compare references, use the 'Is' operator:

\\\
If Not a Is b Then...
///

VB 2005 will contain an 'IsNot' operator which will shorten the code above
to:

\\\
If a IsNot b Then...
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top