Well , When you declare a variable within a procedure, only code within that procedure can read or change the value of that variable: Its scope is local to that procedure. Sometimes, however, you want to use a variable with a broader scope, one whose value is available to all procedures within the same module, or even to all the procedures in all modules. With Visual Basic, you can specify the scope of a variable when you declare it.
Scope of Variables
Depending on how you declare a variable, its either a procedure-level or a module-level variable.
Scope is Private or Public
Procedure-level Variables are private to the procedure in which they appear. Not applicable. You cant declare public variables within a procedure.
Module-level Variables are private to the module in which they appear. Variables are available to all modules.
for more information , visit the source site :
http://msdn.microsoft.com/arch ive/default.asp?url=/archive/en-us/ office97/html/scopelifetimeofvariab les.asp
Answered by
alokgupta14
at
7:36 PM on February 03, 2008