Sub ListAllFiles()
Dim FName As String
Dim Path As String
Dim FCount As Integer
Path = "F:\Tek-Tips\"
FCount = 0
FName = Dir(Path & "*.*", vbNormal)
If FName = "" Then
MsgBox "There are no files in " & Path, vbInformation + vbOKOnly, "List Files"
Else
Application.ScreenUpdating = False
FCount = FCount + 1
ActiveSheet.Cells(FCount, 1).Value = FName
Do
FName = Dir
FCount = FCount + 1
ActiveSheet.Cells(FCount, 1).Value = FName
Loop Until FName = ""
Application.ScreenUpdating = True
End If
End Sub