Hello friends,
I have a nested for-next loop inside another for-next loop, but when the nested loop ends it does not reset to the beginning again for the next item in my array loop. I am pretty sure the problem lies in my declarartions and how VBA handles arrays used in For-Next loops. I am having a mental block concerning declaring arrays and their ranges. An example of the setup is below;
Dim simspg as variant
Dim simspoint as variant
simspg = Array("SP001", "SP002", "SP003", "SP004", "SP005", "SP006", "SP007", "SP008", "SP009", "SP010", "SP011", "SP012", "SP013", _
"SP014", "SP015", "SP016", "SP017", "SP018", "SP019", "SP020", "SP021")
For each simspoint in simspg
For x = 1 to 100
Worksheets (simspoint).select
cells (x,1).value = 12
next
next
How would I properly use these two for-next loops such that "x" is reset to 1 each time a new member of the array is called?
Thanks for any help, Newbee BAT:-)
Bookmarks