using this code returns 0 files found
from windows search the files are found...
I AM LOST IN THIS THING:mad:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 10 And Target.Row = 1 Then
Cancel = True
For Each c In Range("fnam")
fn = c.Value
FilePath = "C:\SC Engineering"
FileSpec = fn '& ".*"
FilesFixed = 0
Set FS = Application.FileSearch
.LookIn = FilePath
.FileName = FileSpec
.SearchSubFolders = True
foundFileCount = .FoundFiles.Count
If foundFileCount = 0 Then
MsgBox "No files found."
Else: Cancel = False
02-11-2008, 12:57 PM
Have you stepped through the code to see what it is actually doing?
02-11-2008, 01:03 PM
it says 0 files found
each msbox shows the steps it is just returning o files found
02-11-2008, 01:44 PM
No, I mean put a break at the beginning of the routine and step through the code execution using F8
02-11-2008, 01:47 PM
did that and it appears as if it is looking at a blank directory...
the code executes fine..I think there is something missing
I get no errors..
i use msgbox like debug.print