Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To Loop From File0001.xls To File0150.xls
Using....
For j = 1 To 101 FileToOpen = "File000" & j & ".xls" ...... This obviously fails when it tries to open File0010.xls. Can you loop with it recognising the preceeding 0's in the number ? I know you can use the length of j to then alter the number of 0's after the File component by using if/elseifs or case select etc but I'm sure there must be a way of looping from 0001 to 0010 to 0150. Question is ...is there ? Kind Regards Donna |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
How do I create a For loop within a For loop? | Excel Programming | |||
Worksheet_Change - loop within a loop | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |