FileSearch Problems
Hello,
I wrote a program on Excel 2003 that used Application.FileSearch to look for
any file within a certain folder, checked to see if it was an *.xls file,
opened it if it was, copied data to a host spreadsheet, closed the open file
when finished, then moved the file to another folder. I was able to run this
code fine at work, but on my home computer, the code cannot detect any file
within the folder. As a matter of fact, Excel can't seem to find any file of
any file type within any folder.
My file addresses are correct, so that isn't the problem. Is there some
setting that needs to be turned on to allow file system objects? I'm at a
loss...
Here's the code:
Dim fs
Set fs = Application.FileSearch
With fs
.LookIn = "F:\Forms\New Orders"
.Filename = "*.xls"
If .Execute 0 Then
For i = 1 To .FoundFiles.Count
Dim xlsfile As String
xlsfile = .FoundFiles(i)
....
Also, is there a way to set the mouse wheel to scroll when in Visual Basic
Editor?
Thanks,
Matthew
|