C
Claude
I have written the following code that opens the files in
a directory, then performs some manipulations, and saves
the file:
Do While NameOfFile <> ""
Application.EnableEvents = False
Workbooks.Open (CurDir & "\" & NameOfFile)
Application.EnableEvents = True
....
Workbooks(NameOfFile).Close savechanges:=True
NameOfFile = Dir()
Loop
What puzzles me is that the loop runs 48 times, then stops
without reason. Is there some limitation on how many times
the dir() command can be run? File 49 is in no way
different to the other files.
a directory, then performs some manipulations, and saves
the file:
Do While NameOfFile <> ""
Application.EnableEvents = False
Workbooks.Open (CurDir & "\" & NameOfFile)
Application.EnableEvents = True
....
Workbooks(NameOfFile).Close savechanges:=True
NameOfFile = Dir()
Loop
What puzzles me is that the loop runs 48 times, then stops
without reason. Is there some limitation on how many times
the dir() command can be run? File 49 is in no way
different to the other files.