vini
vini

Reputation: 4742

What operator is <> in VBA

I was studying some code and came across this:

If DblBalance <> 0 Then

I can't figure out what operator this is, any help would be appreciated.

Upvotes: 25

Views: 221612

Answers (7)

Abubakkar
Abubakkar

Reputation: 15664

It is an "INEQUALITY" operator. Get a list of comparison operators in VBA

Upvotes: 3

shishir
shishir

Reputation: 851

In VBA this is <> (Not equal to) operator.

The result becomes true if expression1 <> expression2

The result becomes false if expression1 = expression2

Additional Reading 1

Additional Reading 2

Upvotes: 0

Kurt H
Kurt H

Reputation: 3

This is an Inequality operator.

Also,this might be helpful for future: Operators listed by Functionality

Upvotes: -1

DigitalRoss
DigitalRoss

Reputation: 146141

Not Equal To


Before C came along and popularized !=, languages tended to use <> for not equal to.

At least, the various dialects of Basic did, and they predate C.

An even older and more unusual case is Fortran, which uses .NE., as in X .NE. Y.

Upvotes: 8

Xathereal
Xathereal

Reputation: 367

It means not equal to, as the others said..

I just wanted to say that I read that as "greater than or lesser than".

e.g.

let x = 12

if x <> 0 then
    //code

In this case 'x' is greater than (that's the '>' symbol) 0.

Hope this helps. :D

Upvotes: 8

rahul
rahul

Reputation: 6487

in sql... we use it for "not equals"... I am guessing, its the same in VB aswell.

Upvotes: 1

ThiefMaster
ThiefMaster

Reputation: 318578

It is the "not equal" operator, i.e. the equivalent of != in pretty much every other language.

Upvotes: 48

Related Questions