Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
For loop after couple of If then else statements
#1
Not Solved
Hi
I am trying to use for loop in the middle of the code and is not working. The way I wrote is as follows
[statements to execute - 1st set]
For i = 1 To 3
[statements to execute - 2nd set]
Next
In the above situation the loop is not getting executed at all. 1st set of statements are executed 3 times.
So Changed it to
Dim i
[statements to execute - 1st set]
For i = 1 To 3
[statements to execute - 2nd set]
Next
Now there are 3 sets of "1st statement executes and then the 2nd statement is executed 3 times" (that means 3 times this path).
The 1st statement has 9 blocks of if then end if statements.
Can any one help me here pelase???
Reply


Messages In This Thread
For loop after couple of If then else statements - by Mala - 02-16-2011, 12:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Infinit loop Suma Parimal 1 2,771 05-29-2014, 01:22 PM
Last Post: basanth27
  Exit Do loop shipu 1 4,896 12-20-2013, 06:33 AM
Last Post: basanth27
Smile Infinite FOR loop issue Sivapratha 3 4,445 04-01-2013, 09:44 AM
Last Post: basanth27
  embedded if statements folker 1 2,695 11-04-2011, 11:16 AM
Last Post: Ankesh
  Do Until loop returning failure mitch 0 3,595 05-27-2011, 12:20 AM
Last Post: mitch

Forum Jump:


Users browsing this thread: 2 Guest(s)