Hi, I have 270 Excel files in a folder and i want to print all 270 file names but when i "select all" in the folder and press print the printer starts to print the actual Excel file contents instead of just the Excel file names. It locked the laptop up trying to dump all the info into the buffer :(
Is there a way round it please ? All i want is a printed list of the Excel file names for a record.
Sub ListFiles() Dim MyFolder As String, MyFile As String, j As Integer MyFolder = "C:\example" ' change to suit MyFile = Dir(MyFolder & "\*.xls") Sheets.Add Do While MyFile <> "" j = j + 1 Cells(j, 1).Value = MyFile MyFile = Dir Loop Columns("A").AutoFit End Sub
When I have wanted a list of files titles only, they have been in the same folder, and them only. I did a screen dump of the window where the files are, copied into Paint, saved as .jpg and then print out.
I'm interested in the method mentioned by mgmcc, creating a txt file so I shall look into that - thanks, mgmcc.
Hope you manage to achieve what you are wanting to do Julie
Here is an extremely easy way, if you have Firefox! Just drag and drop your folder onto either the Firefox icon or webpage and you will immediately have a list which you can print out! Have just tried it out!
It doesn't seem to work in Internet Explorer, though. Don't have any others to try it on.
Found this tip at click here after clicking on the 'Click here' link in message from mgmcc but scolled to the bottom of the page and found a comment from 'thinkerer' - many thanks to s/he!!!
Thanks guys, I just love learning new tricks!!! Happy New Year Julie