View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default short circuit for next; continue?

If I understand

y=12
for i = 2 to y
if lcase(cells(i,"b"))="yes" then
msgbox cells(i,"c")
exit for
else
msgbox "go on"
end if
next i

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"cate" wrote in message
...
Is there a way to do this in vba? (I can do this with structure but I
want to know if there is a perl/C# analog to (continue")

for x = 2 to y

answer = sub_testing()
if answer = 1
continue ' skip the reset of loop code and go back and get the
next value. No point in going on
end if

do more stuff
do more stuff

next

thank you.