Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I run my codes using Excel Version 10.0 under Windows XP it is fine but when I run the same code using Excel Version 8.0e under Windows 1998, it would output 'There were no files found" despite the fact files (*cf) are present. Can anyone tell me where I've gone wrong with codes
Set fs = Application.FileSearc With f .LookIn = "C:\My Documents .FileName = "*cf If .Execute(SortBy:=msoSortbyFileName, SortOrder:=msoSortOrderAscending) 0 The MsgBox "There were " & .FoundFiles.Count & " file(s) found. For i = 1 To .FoundFiles.Coun MsgBox .FoundFiles(i Next Els MsgBox "There were no files found. End I End Wit |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think I remember that xl97 has a problem with * . Another way,perhaps?
-- Don Guillett SalesAid Software "Francis Ang" wrote in message ... When I run my codes using Excel Version 10.0 under Windows XP it is fine but when I run the same code using Excel Version 8.0e under Windows 1998, it would output 'There were no files found" despite the fact files (*cf) are present. Can anyone tell me where I've gone wrong with codes. Set fs = Application.FileSearch With fs .LookIn = "C:\My Documents" .FileName = "*cf" If .Execute(SortBy:=msoSortbyFileName, _ SortOrder:=msoSortOrderAscending) 0 Then MsgBox "There were " & .FoundFiles.Count & _ " file(s) found." For i = 1 To .FoundFiles.Count MsgBox .FoundFiles(i) Next i Else MsgBox "There were no files found." End If End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do you search for a file in Excel 07? | Excel Discussion (Misc queries) | |||
file search or search files | Excel Discussion (Misc queries) | |||
Search a FAQ file | Excel Worksheet Functions | |||
Turning a text file name into a search and linking the file as a hyperlink | Excel Discussion (Misc queries) | |||
Macro to search from one file & place on another file. | Excel Programming |