ugotaccpaced
Technical User
Say I have a game with 999 lights that are named Light001, Light002, Light003 through Light999. At the start of the game I need to turn all 999 lights to on. Is there a way to use For/Next to do this rather than have to individually write code to turn on each light?
ex.
Dim i
For i = 1 to 999
SomeFunction("Light" & Right("000" & i, 3)).State = On
Next
ex.
Dim i
For i = 1 to 999
SomeFunction("Light" & Right("000" & i, 3)).State = On
Next