Can anyone tell me if there is a way to do this. I'm trying to skip over duplicate entries in an array. I'm using VBA
For x = 1 to 50 (not really using 50)
If coord(x) = coord(x-1) then next x
(do stuff here)
Next x
I get an error "Next without For" in the if...then statement. Is this not legal?
Instead I'm doing this:
For x = 1 to 50 (not really using 50)
If coord(x) = coord(x-1) then goto Skip
(do stuff here)
Skip:
Next x
__________________ Gerry
Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |