Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.Filesearch
Can anyone please advise why the code below worked with Excel 2000 but not
with Excel 2003? With Application.FileSearch .Filename = "C:\Test.xls" If .Execute 0 Then Workbooks.Open Filename:="C:\Text.xls" End If End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.Filesearch
FileSearch seems so flakey that it best avoided.
Use Dir or better GetAttr to determine if the file exists. NickHK "EA" ... Can anyone please advise why the code below worked with Excel 2000 but not with Excel 2003? With Application.FileSearch .Filename = "C:\Test.xls" If .Execute 0 Then Workbooks.Open Filename:="C:\Text.xls" End If End With |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.Filesearch
I always use DIR myself, but an inexperienced programmer asked me the
question below and I had not answer for him, especially when he demonstrated. I was hoping one of the MVPs would offer some input. "NickHK" wrote in message ... FileSearch seems so flakey that it best avoided. Use Dir or better GetAttr to determine if the file exists. NickHK "EA" ... Can anyone please advise why the code below worked with Excel 2000 but not with Excel 2003? With Application.FileSearch .Filename = "C:\Test.xls" If .Execute 0 Then Workbooks.Open Filename:="C:\Text.xls" End If End With |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.Filesearch
The dubious results of FileSearch mean that you cannot rely on them.
Seems like MS have given up on it in the 2007 version anyway. http://forums.microsoft.com/TechNet/...7153&SiteID=17 NickHK "EA" wrote in message ... I always use DIR myself, but an inexperienced programmer asked me the question below and I had not answer for him, especially when he demonstrated. I was hoping one of the MVPs would offer some input. "NickHK" wrote in message ... FileSearch seems so flakey that it best avoided. Use Dir or better GetAttr to determine if the file exists. NickHK "EA" ... Can anyone please advise why the code below worked with Excel 2000 but not with Excel 2003? With Application.FileSearch .Filename = "C:\Test.xls" If .Execute 0 Then Workbooks.Open Filename:="C:\Text.xls" End If End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Application.FileSearch | Excel Discussion (Misc queries) | |||
Application.FileSearch malfunction?????? | Excel Programming | |||
Application.FileSearch challenge | Excel Programming | |||
Help with Application.FileSearch method | Excel Programming | |||
VBA Application.FileSearch | Excel Programming |