Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If file exists then
Want to check if file exists zzz.xxx if true call a macro KillFile if not
exit Blanked out Thanks If ("C:\Parade\zzz.txt") Then Call KillFile Exit Sub ' Else End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If file exists then
If Len(Dir("C:\Parade\zzz.txt")) 0 Then ' File exists
Rick "Curt" wrote in message ... Want to check if file exists zzz.xxx if true call a macro KillFile if not exit Blanked out Thanks If ("C:\Parade\zzz.txt") Then Call KillFile Exit Sub ' Else End If |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If file exists then
Curt,
Public Function FileExists(FileName as String) As Boolean FileExists = Len(Dir(FileName)) End Function If FileExists("C:\Parade\zzz.txt") Then Call KillFile Exit Sub Else 'Whatever End If HTH, John "Curt" wrote in message ... Want to check if file exists zzz.xxx if true call a macro KillFile if not exit Blanked out Thanks If ("C:\Parade\zzz.txt") Then Call KillFile Exit Sub ' Else End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check if a sheet exists in a file, without opening that file | Excel Programming | |||
File Exists | Excel Discussion (Misc queries) | |||
File Exists | Excel Programming | |||
IF File Exists | Excel Programming | |||
the file already exists - do you want to replace the existing file? | Excel Programming |