How can I print list of exel files names in folder
In a new Workbook - Sheet1 run the Standard macro
Sub listthefiles()
Cells.ClearContents
Range(quot;A1quot;).Select
Set fs = Application.FileSearch
With fs
..LookIn = quot;C:\JMay\MyStuff\quot;
..Filename = quot;*.xlsquot;
If .Execute gt; 0 Then
For I = 1 To .FoundFiles.Count
ActiveCell.FormulaR1C1 = .FoundFiles(I)
ActiveCell.Offset(0, 1).Range(quot;A1quot;).Select
ActiveCell.FormulaR1C1 = quot;=RIGHT(RC[-1],LEN(RC[-1])-45)quot;
ActiveCell.Value = ActiveCell.Value
ActiveCell.Offset(1, -1).Select
Next I
Else
End If
End With
Range(quot;A:Aquot;).Delete
Range(quot;A1quot;).Select
End Sub
quot;Marc R Sorger CWquot; wrote:
gt; How can I print list of exel files names in folder
- Jul 16 Mon 2007 20:38
exel list copying
close
全站熱搜
留言列表
發表留言