can not assign value to LookIn

  • Thread starter Thread starter QQExcel
  • Start date Start date
Q

QQExcel

Hi, everyone,

I saw couple messages regrad to Lookin property, but still can't get
mine. Here is my code:

FilePath = ThisWorkbook.Path & "\Phase1_Comments\"
Set FS = Application.FileSearch
With FS
.LookIn = """" & FilePath & """"
.FileName = FileSpec
.Execute
If .FoundFiles.Count = 0 Then
MsgBox "No files were found, ........."
Exit Sub
End If
End With

ThisWorkbook.Path is a hyperlink address as http://he2....
..LookIn refers to C:\Documents and Seetings\... and won't change to
FilePath

Anyone could help me? Appreciated..........
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top