A local variable's lifetime begins when control enters the procedure in which it is declared. Every local variable is initialized to the default value for its data type as soon as the procedure begins running. When the procedure encounters a Dim statement that specifies initial values, it sets those variables to those values, even if your code had already assigned other values to them.
Each member of a structure variable is initialized as if it were a separate variable. Similarly, each element of an array variable is initialized individually.
Variables declared within a block inside a procedure (such as a For loop) are initialized on entry to the procedure. These initializations take effect whether or not your code ever executes the block.