Procedure Scope

A local or procedure level variable is declared inside an individual procedure or function and is not visible outside that subroutine
Local variables can only be used in the procedure in which they are declared in.
When the procedure or function ends the variable is automatically removed and the memory is released.
You can use the Dim, Static or Private statement within a subroutine or function.
The most common way to declare a local variable is to use the Dim statement between the Sub and End Sub statements.
One of the great advantages of local variables is that we can use the same name in different subroutines without any conflicts.

Public Sub Procedure_Name() 
Dim slocalvariable As String

End Sub


© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext