View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Varne Varne is offline
external usenet poster
 
Posts: 126
Default File Listing in a Directory

Hi!

Could someone tell me whats wrong with these codes?


Sub FileList()
Dim File As Variant
With Application.FileSearch
.LookIn = "C:\"
.FileType = msoFileTypeAllFiles
.Execute
For Each File In .FoundFiles
MsgBox File
Next File
End With
End Sub

Run Time Error 445 - Object does not support this action!

Thanks