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: 17
Default Filesearch 1004 error with XL 2003

Has anyone come across the problem of Filesearch causing an 1004 error
message. Running the compiler doesn't cause a problem. The macro stops it's
on the line:
Set fs = application.filesearch

The error message is: method 'filesearch' of object '_application' failed.
This doesn't seem to be the usual problems using the filesearch command. I'm
using XL 2003 (11.6355.6360) SP1 with Win XP

Many thanks

James

dim fs
dim i as integer

Set fs = Application.FileSearch
With fs
.LookIn = "c:\"
.FileName = "*.xls"
.SearchSubFolders = True

If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending)
0 Then


For i = 1 To .FoundFiles.Count
debug.print .foundfiles(i)
next i
end if
end with



 
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
Run time error 1004 When running in 2003 Lakshman Excel Discussion (Misc queries) 10 January 17th 07 06:06 PM
Runtime error '1004' General ODBC error star_lucas New Users to Excel 0 August 29th 05 04:09 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Run time error '1004': Generaol ODBC error Dwaine Horton[_3_] Excel Programming 2 April 26th 05 02:52 PM
Run time error 1004 General ODCB Error Kevin Excel Programming 3 February 26th 05 12:51 PM


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

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

About Us

"It's about Microsoft Excel"