Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How do I use this code to loop through all the files in a folder and perform
some action on each With Application.FileDialog(msoFileDialogFolderPicker) .InitialFileName = Application.DefaultFilePath & "\" .Title = "Please select the location of the RFDS folder" .Show For Each vrtSelectedItem In .SelectedItems myFile= vrtSelectedItem If .SelectedItems.Count = 0 Then MsgBox "Canceled" Else MsgBox myFile End If Next vrtSelectedItem End With What I am am trying to do is, select a folder and transfer all the information on each file in that folder to a worksheet. The code above gets me to the folder but I need to figure out how to now tell the code to open each file in that folder so that I can perform the neccessary action on the file, close the file and then open the next file in the folder. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Application.FileDialog(msoFileDialogFolderPicker) | Excel Discussion (Misc queries) | |||
Opening a folder by clicking on a link | Excel Discussion (Misc queries) | |||
Changing Opening folder | Excel Worksheet Functions | |||
Need code to save file to new folder, erase from old folder | Excel Discussion (Misc queries) | |||
when opening folder | New Users to Excel |