Opening files by VBA
Thanx Bob, works perfect!
"Bob Phillips" wrote:
Dim sFile As String
sFile = Dir("C:\TestFolders\*.xls", vbNormal)
If sFile < "" Then
Do
'do your stuff
Debug.Print sFile
sFile = Dir
Loop Until sFile = ""
End If
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Dutch76" wrote in message
...
Hello,
I want to open Excel-files (one by one) that are in a certain directory.
With the opened files I want to do some calculations by means of a VBA
macro
which is stored in a already opened workbook. After the calculations the
files are closed again.
How do I manage to open the files one by one from the macro?
An answer to this would be very helpful...
|