Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
In 2007, the application.filesearch no longer works for my vba scripts, I'm trying to find a work around, I figured out how to loop through files in a given folder, but need help creating one more nested loop so that I can loop through folders, then loop through the files in each folder, here is a sample of what I have so far, any help would be greatly appreciated. Dim sFolder As String Dim Folder As Object Dim file As Object Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") sFolder = "C:\temp" '***I have multiple folders in temp, need to find code to loop thru each...... If sFolder < "" Then Set Folder = fso.GetFolder(sFolder) For Each file In Folder.Files MyFile = file '**** do stuff to each file Next file End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
application.filesearch error in excel 2007 | Excel Programming | |||
Application.FileSearch in 2007 | Excel Programming | |||
replacement for Application.FileSearch in 2007 | Excel Programming | |||
Code No Longer Works in 2007 | Excel Programming | |||
??? application.screenupdating no longer works! Why??? | Excel Programming |