Thread: File Searching
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lawson Lawson is offline
external usenet poster
 
Posts: 15
Default File Searching

hello,

im having trouble with this part of my program in that it
doesnt distinguish between FILES and FOLDERS. if there is
an excel FILE in this section of the folder with the same
name as the user has entered, it says it found one. i
only want it to return a positive value if it found a
FOLDER with the name entered by the user.


With Application.FileSearch
.LookIn = "\\Cpi-server-1
\estimate\Quotes\EST" & Range("q262") & "000\EST" & Range
("q263") & "00"
.Filename = Range("q261")
If .Execute 0 Then
MsgBox "File '" & Range("q261") & "' already
exists with " & .FoundFiles.Count & " file(s) in it."
Else