Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When a file has been E-Mailed with my code, it is saved as
C:\Contracts EMailed\'Current file name' + _EM. IF one tries to resave the original file, this code is to check if it has been saved before. If YES, then, exit, if NO, continue. Sub CheckFileName() ' Check if the following exists: ' C:\Contracts EMailed\'filename'_EM.xls ' IF it exists, then Process is not allowed ' NotAllowed Message pops up, Click OK, and project Exits ' If it does NOT exist, then Continue Dim FName As String FName = ActiveWorkbook.Name Dim NewName As String NewName = FName + "_EM" ' The following line comes up with Compile Error - Syntax error If "C:\Contracts EMailed\NewName.Exists = True Then Call NotAllowed Else: Exit Sub End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Modified File Organization | Excel Discussion (Misc queries) | |||
date file modified | Excel Discussion (Misc queries) | |||
Get the date a file was modified | Excel Programming | |||
insert the date the file was last modified | Excel Discussion (Misc queries) | |||
Detect if a file is in use or being modified | Excel Programming |