thanks for all the replies...
does Excel VBA have a substitute command for "Continue" ..
Thanks and Regards,
Vivek Agrawal
Skype ID - vivek.agrawal83
GoogleMoonlight.com - Saving energy-Save Earth
On Wed, Jul 29, 2009 at 4:43 PM, Daniel wrote:
> Hi.
>
>
>
> Randomize
>
Hi Vivek,
Please find below the piece of code requested.
Val = 4
For i = 1 To 1000
If Val < 10 Then
Exit For
End If
MsgBox i
Next
Regards
Raju
On Wed, Jul 29, 2009 at 4:24 PM, vivek agrawal wrote:
> Hi ALL
> Can anybody please tell me how to Escape a for loop ...
>
> f
use GOTO
there is no statement such as Continue in VBA
for i=1 to 1000
if i=5 then goto NextLoop
' other code
NextLoop:
next i
On Wed, Jul 29, 2009 at 2:47 PM, vivek agrawal wrote:
> Hello Kumaran
> Exit For would completely exit from the for loop..
>
> i want it to skip the code for th
Randomize
For i = 1 To 1000
Var = Rnd * 10
If Var < 5 Then GoTo myNext
'next instructions
myNext:
Next i
or
Randomize
For i = 1 To 1000
Var = Rnd * 10
If Var >= 5 Then
'next instructions
End If
Next i
Daniel
On
Hello Kumaran
Exit For would completely exit from the for loop..
i want it to skip the code for the current loop and iterate to the next loop
Thanks and Regards,
Vivek Agrawal
Skype ID - vivek.agrawal83
GoogleMoonlight.com - Saving energy-Save Earth
On Wed, Jul 29, 2009 at 4:45 PM, OfficeVb
Hi.
Randomize
For i = 1 To 1000
Var = Rnd * 10
If Var < 5 Then Exit For
Next i
'next instructions
Regards.
Daniel
From: excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com]
On Behalf Of vivek agrawal
Sent: mercredi 29 juillet 2009 12