Not quite sure what you're after but if you want a set of numbers use might as well use the for...next loop
The Step syntax tells how many to count each time the loop goes around, e.g. a step 2 means the number will count from 1 then 3, 5,7,9 then because 'to 10' has been set the value will dtop at 9.
sub myForNextLoop()
dim myLoop as integer
for myLoop = 1 to 10 step 2
'actions go here
msgbox(myLoop)
next
end sub
cheers
Matt
|