RE: Most efficient way to loop through a folder and find all the XLS f
- From: Joel <Joel@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Oct 2008 11:18:36 -0700
I think dir is the easiest way
Folder = "c:\temp\"
FName = dir(Folder & "*.xls")
Do while FName <> ""
set bk = workbooks.open(filename:=FName)
'enter your code here
bk.close savechanges:=False
FName = dir()
loop
"Barb Reinhardt" wrote:
I've done this a number of ways, but am wondering what the most efficient way.
is to loop through a folder. I've used DIR and File Scripting Objects.
Which is the best way?
Thanks,
Barb Reinhardt
- References:
- Most efficient way to loop through a folder and find all the XLS f
- From: Barb Reinhardt
- Most efficient way to loop through a folder and find all the XLS f
- Prev by Date: disable workbook
- Next by Date: Remove empty rows from a range
- Previous by thread: Re: Most efficient way to loop through a folder and find all the XLS f
- Next by thread: Re: Most efficient way to loop through a folder and find all the XLS f
- Index(es):
Relevant Pages
|