|
-
excel vba file search
using this code returns 0 files found
from windows search the files are found...
I AM LOST IN THIS THING
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 '& ".*"
MsgBox FileSpec
FilesFixed = 0
Set FS = Application.FileSearch
With FS
.NewSearch
.LookIn = FilePath
.FileName = FileSpec
.SearchSubFolders = True
.Execute
foundFileCount = .FoundFiles.Count
MsgBox .FoundFiles.Count
End With
If foundFileCount = 0 Then
MsgBox "No files found."
Exit Sub
End If
Next c
Else: Cancel = False
End If
End Sub
Similar Threads
-
By Sinni in forum VB Classic
Replies: 2
Last Post: 07-31-2007, 01:27 AM
-
By extreme in forum VB Classic
Replies: 0
Last Post: 06-13-2007, 09:51 PM
-
By jewkaheng in forum VB Classic
Replies: 2
Last Post: 07-18-2005, 08:46 AM
-
Replies: 146
Last Post: 08-12-2002, 10:40 PM
-
By Tomer Cagan in forum ASP.NET
Replies: 1
Last Post: 07-24-2001, 09:01 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks