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.
Variables are private to the procedure in which they appear.
You can't declare public variables within a procedure. Module-level Variables are private to the module in which they appear. Variables are available to all modules. Top Variables Used Within a Procedure Procedure-level variables are recognized only in the procedure in which they're declared. These are also known as local variables.