View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default loop through files

As a start...

Sub ProcessFiles()
Dim FileDir As String
Dim FName As String
Application.ScreenUpdating = False
FileDir = "C:\Files\"
FName = Dir(FileDir)
Do Until FName = ""
Workbooks.Open FileDir & FName, False, True
''Add extracting code...
ActiveWorkbook.Close False
FName = Dir()
Loop
End Sub

--
Jim Rech
Excel MVP
"Newbie" wrote in message
...
| Hi,
|
| I need to loop through all the files in a directory to extract data from a
| specific cell but without naming the files explicitly.
|
| Can anyone help please?