I've done something similar.
For a) I automated Outlook from Excel, saving the email attachments to a folder, see http://www.*****-clicks.com/Excel.htm
The answer to b) is not to rely on each sheet having an exact name. I used FileSystemObject To process all Excel files in a folder, see code snippet:
(Set a reference to Microsoft Scripting Runtime to use FSO)
Sub ProcessSheets()
Dim oFSO as New FileSystemObject
dim sFolder as String
dim oFolder as Object, oFile as Object, oFiles as Object
dim sceWB as Workbook
sFolder = ThisWorkbook.Path & "\"
Set oFolder = oFSO.GetFolder(sFolder)
Set oFiles = oFolder.Files
For Each oFile in oFiles
If oFile.Type = "Microsoft Excel Worksheet" Then
Set sceWB = Workbooks.Open(FileName:=oFile.Path) 'open workbook
'Copy stuff to master workbook here
sceWB.Close
End If
Next oFile
Set oFolder = Nothing
Set oFile = Nothing
Set oFiles = Nothing
End Sub
Bookmarks