Open a file do a macro ( made) and open next succesive file
Here's the general idea:
Sub OpenUserSelectedFiles()
Dim i As Integer
Dim filearray As Variant
filearray = Application.GetOpenFilename( _
Title:="Select the files to process", MultiSelect:=True)
If IsArray(filearray) Then
For i = LBound(filearray) To UBound(filearray)
Workbooks.Open filearray(i)
'Call your macro here
ActiveWorkbook.Close False
Next i
Else:
MsgBox "You clicked cancel"
End If
End Sub
HTH,
Bernie
MS Excel MVP
"SVTman74" wrote in message
...
Open a file do a macro ( made) and open next succesive file
File name yyyy-mm-ddxxxx.csv <--- the date is the creation date.
can I have excel run the macro to auto matically open first file in dir run
its parse and save ( this is done) THEN open the next file and continue?
|