M
mb
Seem to have a problem with this line:
UserForm1.ListBox1.AddItem .FoundFiles(i)
Entire Script:
Sub FindFiles()
With Application.FileSearch
.NewSearch
.LookIn = "D:\AllData\APICS"
.SearchSubFolders = True
.TextorProperty = "APICS Dictionary"
.MatchTextExactly = True
.Filename = "*.xls"
.Execute
For i = 1 to .FoundFiles.Count
UserForm1.ListBox1.AddItem .FoundFiles(i)
next i
End With
UserForm1.Show
End Sub
Any ideas?
Thanks,
mb
UserForm1.ListBox1.AddItem .FoundFiles(i)
Entire Script:
Sub FindFiles()
With Application.FileSearch
.NewSearch
.LookIn = "D:\AllData\APICS"
.SearchSubFolders = True
.TextorProperty = "APICS Dictionary"
.MatchTextExactly = True
.Filename = "*.xls"
.Execute
For i = 1 to .FoundFiles.Count
UserForm1.ListBox1.AddItem .FoundFiles(i)
next i
End With
UserForm1.Show
End Sub
Any ideas?
Thanks,
mb