Opening a Succession
First = True
Do while (1)
if First = True then
MyFilename = Dir("C:\JDIS_FILES\PURGRPT_" & "*.jdis")
First = False
else
MyFileName = Dir()
end if
if MyFilename = "" then exit do
Workbooks.OpenText FILENAME:= MyFileName
loop
"bodhisatvaofboogie" wrote:
Workbooks.OpenText FILENAME:= _
"C:\JDIS_FILES\PURGRPT_" & "*.jdis"
This opens the file in the directory I want to be opened. However my
question is:
If there are say 10 reports with that prefix and suffix in that direcory, is
there a way I can have a macro open the first one, then the next one, then
the next one etc. On down the line until the last one then stop?
Does that make sense?
|