What does this do?
Does it list all the files you need?Code:Sub MyFileListAtMyFolder() ' Dim myPathAndFiles As String Let myPathAndFiles = "D:\test\*.xls*" ' Dim StrDirBack As String Let StrDirBack = Dir(myPathAndFiles, vbNormal) ' Initial file search for all Excel files - * is a wildcard, so any file like MyFile.xlsx or BN.xls etc. will meet the search criteria - the file need only have .xls in it Do While Not StrDirBack = "" ' Dir will return "" if no next file is found Dim MyFilesList As String Let MyFilesList = MyFilesList & vbCr & vbLf & StrDirBack ' add a line and the next found file name to our file list Let StrDirBack = Dir ' If Dir is used with no arguments, then it looks for the next file with the previous serach criteria Loop ' MsgBox Prompt:=MyFilesList, Title:="My Files from " & myPathAndFiles End Sub
I need to know
_1)
either
The tab name of the summary sheet
or
The tab number, ( counting from the left )
_2) what name should the saved file have




Reply With Quote

Bookmarks