Error trying to exit loop
Posted: Thu Nov 27, 2014 12:17 am
Hi
I am trying to run a program through multiple files. the files are named 2002-1, 2002-2 up to 2002-12. If I do not put the exitloop in then the loop keeps running. If I do put the exit loop in I get an error message after the first file. My code currently is as follows. I would also like to save and close the files.
for !i = 1 to 13
wfopen C:\Users\01404702\Documents\1.Workfile\2002-!i
include masters
if !i > 12 then exitloop
Next
I would appreciate any help
I am trying to run a program through multiple files. the files are named 2002-1, 2002-2 up to 2002-12. If I do not put the exitloop in then the loop keeps running. If I do put the exit loop in I get an error message after the first file. My code currently is as follows. I would also like to save and close the files.
for !i = 1 to 13
wfopen C:\Users\01404702\Documents\1.Workfile\2002-!i
include masters
if !i > 12 then exitloop
Next
I would appreciate any help