#1   Report Post  
Posted to microsoft.public.excel.misc
Marc R Sorger CW
 
Posts: n/a
Default exel list copying

How can I print list of exel files names in folder
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default exel list copying

In a new Workbook - Sheet1 run the Standard macro

Sub listthefiles()
Cells.ClearContents
Range("A1").Select
Set fs = Application.FileSearch
With fs
..LookIn = "C:\JMay\MyStuff\"
..Filename = "*.xls"
If .Execute 0 Then
For I = 1 To .FoundFiles.Count
ActiveCell.FormulaR1C1 = .FoundFiles(I)
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=RIGHT(RC[-1],LEN(RC[-1])-45)"
ActiveCell.Value = ActiveCell.Value
ActiveCell.Offset(1, -1).Select
Next I
Else
End If
End With
Range("A:A").Delete
Range("A1").Select
End Sub

"Marc R Sorger CW" wrote:

How can I print list of exel files names in folder

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Drop Down List I''m Still Here Excel Discussion (Misc queries) 5 March 22nd 06 08:46 PM
Copying Data List to Different Worksheet rhovey Excel Discussion (Misc queries) 0 March 16th 06 03:02 PM
Copying list item (a bit less vague) Hru48 Excel Discussion (Misc queries) 7 September 29th 05 04:51 PM
copying list items Hru48 Excel Discussion (Misc queries) 0 September 28th 05 04:14 PM
Refresh a Validation List? jhollin1138 Excel Discussion (Misc queries) 3 February 17th 05 05:48 PM


All times are GMT +1. The time now is 08:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"