View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] raymond.allan@bench.com is offline
external usenet poster
 
Posts: 24
Default Scan a Directory

Try:

With Application.FileSearch
.LookIn = "C:\My Documents"
.Filename = "*"
If .Execute 0 Then
For x = 1 To .FoundFiles.Count
tFilename = .FoundFiles(x)
Lb_Dash.AddItem (tFilename)
Next x
Else
MsgBox "No Files"
End If
End With

HTH