Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have a function written in Excel 2003: Sub Check_if_files_exist(path, fname, fileexists2) With Application.FileSearch .NewSearch .FileName = fname .LookIn = path .Execute If .FoundFiles.Count = 1 Then fileexists2 = 1 'The File exists Else fileexists2 = 0 'The file does not exist End If End With End Sub The problem is that someone with 2007 cant use this because it does not recognize With Application.FileSearch. Is there another command that is compatable in both 2003 and 2007? Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Use Dir Jeff
If Dir("C:\test.xls") < "" Then -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Jeff" wrote in message ... Hi, I have a function written in Excel 2003: Sub Check_if_files_exist(path, fname, fileexists2) With Application.FileSearch .NewSearch .FileName = fname .LookIn = path .Execute If .FoundFiles.Count = 1 Then fileexists2 = 1 'The File exists Else fileexists2 = 0 'The file does not exist End If End With End Sub The problem is that someone with 2007 cant use this because it does not recognize With Application.FileSearch. Is there another command that is compatable in both 2003 and 2007? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Compatability Pack for Office 2003 | Excel Discussion (Misc queries) | |||
Excel 2007 Compatability Checker | Excel Discussion (Misc queries) | |||
Compatability of Excel 2007 files | Excel Discussion (Misc queries) | |||
Excel compatability 2003-2007 | Setting up and Configuration of Excel | |||
Excel 2007 Compatability | Excel Discussion (Misc queries) |