Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Existing file ?
Im after some code that will check to see if a file exists in a specifi location. Ive been given the below two examples but i cant get them to work. example 1 if Not Dir("C:\DATA\YOURFILE.XLS") then 'the bugger isnot there! end if example2 Sub DoesFileExist() Set MyFile = CreateObject("Scripting.FileSystemObject") MsgBox MyFile.FileExists("c:\filename.xls") End Su -- ceem ----------------------------------------------------------------------- ceemo's Profile: http://www.excelforum.com/member.php...fo&userid=1065 View this thread: http://www.excelforum.com/showthread.php?threadid=40039 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User replaces existing file with blank during file open | Excel Discussion (Misc queries) | |||
Importing text file, only option to edit existing file | Excel Discussion (Misc queries) | |||
Creating a new excel file from an existing file using macro | Excel Programming | |||
can i save an existing .xls file as a .csv file using command line | Excel Discussion (Misc queries) | |||
get path - save new file - same sub-directory as existing file | Excel Programming |