LAST HOPE....Time is Ticking!!
Dim oFSO
Sub LoopFolders()
Set oFSO = CreateObject("Scripting.FileSystemObject")
selectFiles "c:\MyTest"
Set oFSO = Nothing
End Sub
'---------------------------------------------------------------------------
Sub selectFiles(sPath)
'---------------------------------------------------------------------------
Dim Folder As Object
Dim Files As Object
Dim file As Object
Dim fldr
Set Folder = oFSO.GetFolder(sPath)
For Each fldr In Folder.Subfolders
selectFiles fldr.Path
Next fldr
For Each file In Folder.Files
If file.Type = "Microsoft Excel Worksheet" Then
Workbooks.Open Filename:=file.Path
'
'add code here to process the newly opened book
Activeworkbook.Close SaveChanges:=False
End If
Next file
End Sub
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Miss Atlanta" wrote in message
...
Hi All!
This is what I need to do:
On a daily basis, I have to go into windows explorer onto a shared network
drive and open up a folder. Lets call that folder "Monday" Inside the
Monday folder there are as many as 80 excel files in that folder all
consisting of contact names and information. Ex: Name, address, phone,
email.
Each file contains different contacts BUT they are all on formatted the
SAME.
What I have to do is put all these files together on ONE MASTER excel
spreadsheet! What I don't understand is how can I select all of the files
and get them on to that master??? What is the process to get the files on
to
the master file? I can't do a simple cut and paste because like I said it
is
going to be over 80 excel files. I know that I can highlight all files
and
right click to select open. But that opens up ALL of them. Is there a
way
that I can transfer the data from all those files? Please help me. I do
appreciate the links to rondebruin.com but that is kinda confusing
considering I am fairly new to macros and all. I just need someone that
can
suggest a better way of getting the files into one. I REALLY NEED HELP
AND
FAST!..
THANKS to you all!!!
|