Most programs require the temporary storage of data. The data is stored in a variable, which is a temporary storage in the computer's memory.
The variable name is the "identifier", used to identify the data. Variables names must begin with a letter and comprise a series of alphanumeric and '_' up to 255 characters in length.
Visual Basic 6 does not require that a variable be declared before use, but this is a dangerous practice and can lead to logical errors that are difficult to detect. In order to force variable declaration, specify Option Explicit in General Declarations.
Scope and Duration
The scope and duration of a variable is determined by the keywords Dim, Redim, Public, Private and Static. You can declare a variable anywhere in the body of the code, but it is good practice to declare all of your variables in the beginning. Refer to the below table for information on Scope and Duration.

Data Types of Variables
There are different types of variables for different types of data in Visual Basic. They range from dates, true and false, small numbers, large numbers, etc. The data type is determined by the "As" keyword. If the "As" keyword is ommited, VB will default to the "Variant" data type. The table below illustrates the types of variables, examples, and their uses:
Declaring Variables
Declaring a variable in VB is quite easy. You simply combine a Scope and a Data type with a name. dim strMyVar as string You can also Dim multiple variables on one line, but often times people forget to specify a data type, forcing VB to default to Variant type. dim intX as integer, inty as integer, intz as integer
Well that is basically all there is to it. If you have any questions, simply post in here. Not to difficult, but variables are a must in most programs.