View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GregR GregR is offline
external usenet poster
 
Posts: 246
Default Exporting values from many worksheets

Ron, I would like a little variation of this code. I want to open files
in a dir and its subdirs that match a date criteria. In other words,
there are many files in each subdir, but I only want to open the last
revised version or it could be a specific revised date. Copy sheet(1)
of each file to a summary workbook, close the file without saving and
print the summary workbook. Let me know if you need more details. I
have the following code which finds all the files I need (hard coded
date, I would prefer latest revised date), but doesn't copy sheet(1) to
summary WB and doesn't print. TIA

Sub FindRecons()

Dim fs As Object
Dim temp_name As String
Dim i As Long

temp_name = "Rev 3_27_06"

Set fs = Application.FileSearch
With fs
..NewSearch
..LookIn = "G:\IS\IsFinancials\Greg\Project Recons\Active\"
..SearchSubFolders = True
..MatchTextExactly = False
..Filename = temp_name
..Execute

If .FoundFiles.Count 0 Then

For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i

Else

MsgBox "No files !"

End If

End With

End Sub

Greg