Jun 7, 2005 #1 VBUser77 MIS Jan 19, 2005 95 US I am trying to execute this code: dim i as variant dim count as integer For i = 3 to 1 count = i+2 Next i It works when I say for i = 1 to 3. Any ideas or thoughts how to run a for loop with decending values like for i = 3 to 1? Thanks a lot in advance. Jay
I am trying to execute this code: dim i as variant dim count as integer For i = 3 to 1 count = i+2 Next i It works when I say for i = 1 to 3. Any ideas or thoughts how to run a for loop with decending values like for i = 3 to 1? Thanks a lot in advance. Jay
Jun 7, 2005 1 #2 jebry Programmer Aug 6, 2001 3,006 US Hi Jay! Try For i = 3 to 1 Step -1 hth Jeff Bridgham Purdue University Graduate School Data Analyst Upvote 0 Downvote
Jun 7, 2005 #4 1DMF Programmer Jan 18, 2005 8,795 GB Just a thought, if you are using i for an integer loop, is there a reason why you have defined it as variant? Upvote 0 Downvote
Just a thought, if you are using i for an integer loop, is there a reason why you have defined it as variant?