-
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
-
Have you stepped through the code to see what it is actually doing?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
Reply
it says 0 files found
each msbox shows the steps it is just returning o files found
-
No, I mean put a break at the beginning of the routine and step through the code execution using F8
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
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
still lost
-
What do you mean by "blank directory"?
Is the directory empty?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
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