G
gymphil
Can anyone assist?
I am trying to search a directory that contains pdf files, I have found a
bit of code that I thought might achieve what I want to do:
Set fs = Application.FileSearch
With fs
.LookIn = "\\publication order"
.Filename = Me.Text0
.Execute
If Len(.Filename) > 0 Then
For i = 1 To .foundfiles.Count
Me.List2.Additem (.foundfiles(i))
Me.List2.i
Next i
End If
End With
The idea is to populate a listbox 'list2' with the files found using part of
the file name, I am getting a compile error - method or data member not found
(.Additem)
Many thanks
I am trying to search a directory that contains pdf files, I have found a
bit of code that I thought might achieve what I want to do:
Set fs = Application.FileSearch
With fs
.LookIn = "\\publication order"
.Filename = Me.Text0
.Execute
If Len(.Filename) > 0 Then
For i = 1 To .foundfiles.Count
Me.List2.Additem (.foundfiles(i))
Me.List2.i
Next i
End If
End With
The idea is to populate a listbox 'list2' with the files found using part of
the file name, I am getting a compile error - method or data member not found
(.Additem)
Many thanks