View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Help with UserForms

Specifically what problem are you having with the line?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"mb" wrote in message
...
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