Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Statements

A statement in Visual Basic is a complete instruction that can contain keywords, operators, variables, constants, and expressions. All statements fall into one of two categories: declaration statements, which name a variable, constant, or procedure and can also specify a data type; or executable statements, which initiate actions.

In This Section

Statements Overview
Provides a high-level look at statements, including how to have multiple statements on one line, continue a statement over multiple lines, add comments, and check compilation errors.
Assignment Statements
Describes statements that carry out assignment operations, which assign the value on the right side of the operator to the variable on the left side.
Declaration Statements
Describes statements that name and define procedures, variables, arrays, and constants.
Executable Statements
Describes statements that initiate action by executing a method. Executable statements can loop or branch through blocks of code, and often contain mathematical or conditional operators.

Related Sections

Assignment Operators
Provides links to Language Reference topics covering assignment operators such as =, *=, and &=.
Expressions
Shows how to combine elements with operators to yield new values.
Operators
Describes the code units that manipulate value-returning elements, and how to use them efficiently.
Show:
© 2015 Microsoft