O'Reilly logo

Visual Basic: A Beginner's Tutorial by Jayden Ky

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 3

Statements

A computer program is a compilation of instructions called statements. There are dozens of statements in Visual Basic (VB) and some—such as If, While, For, and Select Case—are conditional statements that determine the flow of the program. This chapter discusses the more important VB statements.

Overview

In programming languages, a statement is an instruction to do something. Statements control the sequence of execution of a program. Assigning a value to a variable is an example of a statement.

x = z + 5

Even a variable declaration is a statement.

Dim rowCount As Long

By contrast, an expression is a combination of operators and operands that gets evaluated. For example, z + 5 is an expression.

Statements can be grouped ...

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