If you need a procedural level variable to retain its value between calls to the procedure, declare the variable using the Static keyword
Private Sub MyProcedure2() Static myVar As Integer myVar = myVar + 1 End Sub