ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   can not assign value to LookIn (https://www.excelbanter.com/excel-programming/305562-can-not-assign-value-lookin.html)

QQExcel

can not assign value to LookIn
 
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..........

Tom Ogilvy

can not assign value to LookIn
 
See answer to your second posting of this question.

--
Regards,
Tom Ogilvy

"QQExcel" wrote in message
m...
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..........





All times are GMT +1. The time now is 03:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com