I have variables declared in VBA function like A1,A2,A3.....An
and assigned values to A1,A2,A3...An
now how can I update values in the variables using loop
Dim A1, A2, A3 As Integer, Tmp As String
A1 = 1
A2 = 2
A3 = 3
For i = 1 To 3
Debug.Print A & i
A & i = i+1 --- This line is not working
Next
How can I assign variables without using any arrays
Scripting.Dictionaryinstead.Dimstatement is declaringA1andA2asVariant. If you expected to declare them asIntegeryou need to useDim A1 As Integer, A2 As Integer, A3 As Integer, Tmp As String