Turn Desktop View Off
by Dinesh Thakur

A Variable’s Scope : The scope of a variable is the section of the application that can see and manipulate the variable. If a variable is declared within a procedure, only the code in the specific procedure has access to that variable. When the variable’s scope is limited to a procedure it’s called local.

 
by Dinesh Thakur

Some variables don’t change value during the execution of program. These are constants that appear many times in your code. The constants are preferred for two reasons :

 
by Dinesh Thakur

Variables are used to store values during a program’s execution. So, variables are place values in which you can leave values and recall them at will.

 
by Dinesh Thakur

1. There are several ways of declaring the variable, the most commonly used statement is Dim statement to declare the variable. The syntax for declaring the variable using Dim is as follows:

 
by Dinesh Thakur

1. Visual Basic provides number of built in functions. The Val function is one of it. Val function converts the text data into a numeric value.

 
by Dinesh Thakur

1. The order in which operator are performed determines the result. Consider the expressions 3 + 4 * 2. Over here if addition is done first, the result is 14. However, if multiplication is done first then result is 11.

 
by Dinesh Thakur

In Visual Basic there are some controls properties that return you a Boolean value which can be as condition in the testing. For example, option buttons returns true when they are selected and returns you false when they are not.

 
by Dinesh Thakur

Relational operators: Relational operators are used for comparison of to variables of same data type. These operators are used in the conditions where two values are compared and true or false is returned according to test result.



 
by Dinesh Thakur

1. A power full asset of the computer is its ability to make decisions and to take alternate course of action based on the out come.



 
by Dinesh Thakur

When a Basic statement become too long for one line , use a line-Continuation

character.You can type a space and an underscore , press Enter, and continue the statement on the next line . It is OK to indent the continued lines.The only restriction is that the line-continuation character must appear between elements; you cannot place a continuation in the middle of a literal or split the name of an object or property.