The assignment statement coses the value of the expression on the right side of the equal sign to be stored in this variable specified on the left side of the equal sign.

Syntax: [Let] <variable> = <expression>

Example: Let int C = int A + int B

An expression can be a constant, variable, or any vailed combination of constant and/or variables connected with VB Operator such as +, -, *, /, &&, AND, OR, NOR, XOR.

If the variable name of the left side of equal sign is a string variable then the constant must be a string constant enclosed in quotes.


Example: Dim student1 As string

student= “Bob”.


If expression is numeric constant.

Example: Dim Bit As integer  

                Bit1 = 60


If expression is a variable.

Example: Dim str1 As string

                Dim str2 As string

                str1 = str2


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s