LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with appilcation.filesearch Jan Kronsell[_3_] Excel Programming 3 November 21st 04 12:59 PM
Filesearch in VB6 Colin Charman Excel Programming 3 June 18th 04 04:18 PM
FileSearch Stephen[_6_] Excel Programming 8 June 12th 04 11:14 PM
FileSearch using VBA Mark[_31_] Excel Programming 2 December 24th 03 05:49 PM
.FileSearch Randall[_3_] Excel Programming 4 November 26th 03 01:48 AM


All times are GMT +1. The time now is 01:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"