Since the OP asked about Excel, I assumed that he might know.
Right click sheet tab>view code>Copy/paste the macro into any code
module>change yourfolder to the desired folder name>change your file
extension to .xls for excel files. If xl97 you may need to eliminate the
*.xls and just use .xls
Place cursor focus anywhere within the macro text and touch the f5 button.
Or, from the worksheet use f8 Or assign to a button from the forms or
drawing toolbars.
Don Guillett
SalesAid Software
Excel Developer
[EMAIL PROTECTED]
----- Original Message -----
From: "Wayne Johnson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, November 15, 2006 7:24 AM
Subject: Re: Export file directory to Excel?
At 08:01 AM 11/15/2006, Don Guillett typed:
try this
Sub anotherfindfiles()
Application.ScreenUpdating = False
Dim FN As String ' For File Name
Dim ThisRow As Long
Dim FileLocation As String
FileLocation = "c:\YOURFOLDER\*.YOURFILEEXTENSION"
FN = Dir(FileLocation)
Do Until FN = ""
ThisRow = ThisRow + 1
Cells(ThisRow, 1) = FN
FN = Dir
Loop
Application.ScreenUpdating = True
End Sub
That's great Don but how about tell the rest of the list that may not know
what is one suppose to do with this Sub.
---------------+--------------
I'm a geek that loves to tweak.
--
----------------------------------------
To Change your email Address for this list, send the following message:
CHANGE WIN-HOME your_old_address your_new_address
to: [EMAIL PROTECTED]
Note carefully that both old and new addresses are required.
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.5/533 - Release Date: 11/13/2006
--
----------------------------------------
To Change your email Address for this list, send the following message:
CHANGE WIN-HOME your_old_address your_new_address
to: [EMAIL PROTECTED]
Note carefully that both old and new addresses are required.