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.
- Assignment Operators
- Provides links to Language Reference topics covering assignment operators such as =, *=, and &=.
- Shows how to combine elements with operators to yield new values.
- Describes the code units that manipulate value-returning elements, and how to use them efficiently.