List of ALL Excel documents

cheetah2042

New Member
Joined
Jan 27, 2004
Messages
27
I use Microsoft Excel alot and have many, many documents saved.Need to know if there is a way I can print out ALL Excel document titles?...so I have a list of WHAT I have.....need to do some deleting, but would like a list to check them off.
Is there a way gang?
Please post
Many thanx :rolleyes:
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

sbendbuckeye

Active Member
Joined
Nov 26, 2003
Messages
440
Are you talking about a way to do this with VBA code? Can you write code, and if so, are you familiar with the FileSystemObject which allows you to traverse the folders on your system? Good Luck!
 

cheetah2042

New Member
Joined
Jan 27, 2004
Messages
27
New with Excel....so NOT sure what you are talking about...Just need a 'printout' of ALL my Excel documents (just the titles will do)....Is there a source?...a code....whatever?....that could show me all the documents I have.
Thanx for the quick reply :)
 

Todd Bardoni

Well-known Member
Joined
Aug 29, 2002
Messages
3,042
Try this code to list the names in an excel sheet, then you can print (yoiu'll have to specify the path):-

Code:
Sub test()
    MyPath = "C:\*.xls"
    MyName = Dir(MyPath, vbDirectory)
    Do While MyName <> ""
        Range("A65536").End(xlUp).Offset(1, 0) = MyName
        MyName = Dir
    Loop
End Sub
 

sbendbuckeye

Active Member
Joined
Nov 26, 2003
Messages
440

ADVERTISEMENT

If you mean that you need a list of all of your Excel files where ever they may be stored, here is a quick and dirty way to do it.

1. Open a DOS prompt
2. c:
3. CD \
4. Dir *.xls /s > xlFiles.txt

The above will list all Excel files to a text file named xlFiles.txt which you can open up in NotePad. If that is not what you mean, please post again. Good Luck!
 

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
If you want to print them,
You could very easily go to start... Find... FIles or Folders... enter *.xls.

Once you see all of them, Highlight them then right click and hit print . I even think you can print selection as an option instead In folder, type, modified, etc.

Hope this Helps,
Michael
 

cheetah2042

New Member
Joined
Jan 27, 2004
Messages
27

ADVERTISEMENT

Thanx daniels012
...but that just wanted to start printing out ALL my documents individually.
Waaaayy too many to do that
...JUST need a list...obviuosly I am no techy....
thought it would be a simple request to get alist of my Excel documents..
Thanx anyways Guys
:)
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,257
Assumes you really mean *all* Excel workbook files when you say "ALL Excel document titles". Modify for drive if it is not C.


Sub Test1()
Application.ScreenUpdating = False
Dim NR As Long, FilesToProcess&, FileName$, x&
Columns(1).Clear
Range("A1").Value = "FileName"
NR = 2

With Application.FileSearch
.NewSearch
.LookIn = "C:\"
.SearchSubFolders = True
.FileName = "*.xls"
.Execute
FilesToProcess = .FoundFiles.Count

For x = 1 To .FoundFiles.Count
FileName = .FoundFiles(x)
Cells(NR, 1).Value = FileName
NR = NR + 1
Next x
End With

Columns(1).AutoFit
ActiveSheet.PrintOut
Application.ScreenUpdating = True
End Sub
 

cheetah2042

New Member
Joined
Jan 27, 2004
Messages
27
Ummm sorry...that is all Chinese to me....
and No I don't speak it either...
as previously mentioned I am NO techy...
Thanx Tom
I'm givin' up
Ignore post gang
and thanx for the effort
B
 

sbendbuckeye

Active Member
Joined
Nov 26, 2003
Messages
440
Hello Cheetah,

Did you try my old fashioned way with the DOS prompt? It is ugly, but should work for you without an coding except to copy in the steps as outlined. I hate to see you go away empty! Good Luck!
 

Forum statistics

Threads
1,147,691
Messages
5,742,661
Members
423,746
Latest member
Joaogomes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top