View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Filename search using Office 97 with Windows 2000

Hi Dave

I can tell you why it work this way
I have read that this is sometimes a solution.


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Dave" wrote in message ...
Ron,
That worked. Thanks alot. Why does this combination
not like the wild card?

Dave

-----Original Message-----
Hi Dave

Try .Text instead of *.Text

Post back if this not work for you

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Dave" wrote in message

...
Sorry, got a little happy with the enter key.

I can't get this to work with the mentioned

combination. I
have it working fine on a Windows 2000 machine running
Office 2000, and on a Windows 95 machine running Office
97, but when I try to run it on a Windows 2000 machine
with Office 97, I get a application error. The code

stops
running at the .Filename = "*.txt" line of code.

Thanks in advance for any help.
Dave

-----Original Message-----
Hi,
Set fs = Application.FileSearch

With fs
.LookIn = "C:\My Documents"
.Filename = "*.txt"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
.



.