LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Dir() limited to 48 files?

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.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When IF has limited iterations Drew[_2_] Excel Discussion (Misc queries) 10 June 30th 08 07:42 AM
limited usage jinvictor Excel Discussion (Misc queries) 1 June 14th 06 04:28 PM
VLOOKUP is very limited Bobby Excel Worksheet Functions 7 October 18th 05 08:20 PM
Help! IF function is too limited Ringo Excel Discussion (Misc queries) 2 September 23rd 05 12:11 PM
Limited Sumif Maarten Excel Discussion (Misc queries) 2 May 3rd 05 01:11 PM


All times are GMT +1. The time now is 09:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"