O'Reilly logo

Sams Teach Yourself Visual Basic® 6 in 24 Hours by Sanjaya Hettihewa, Greg Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Making Decisions

You learned Visual Basic's mathematical operators in Hour 5, "Putting Code into Visual Basic," but Visual Basic supports several more operators, as you'll learn in this lesson. The operators described here are known as comparison operators because they compare data and determine the results of the comparison. By using comparison operators, you can write your programs so that they make certain runtime decisions based on the comparison results.

The highlights of this hour include

  • Which comparison operators to use

  • How to form If statements

  • When to use an Else branch

  • How Select Case statements streamline If...Else

Comparison Operators

All comparison operators produce true or false results. In other words, the comparison is either ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required