View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Elceller in distress[_2_] Elceller in distress[_2_] is offline
external usenet poster
 
Posts: 23
Default Returning the Last modified date of a sheet that is currently open

I am making a program that will open a quote and put it into a directory. If
information from the quote is allready in the directory, the program compares
the date that is given in the quote. In some cases the date is the same but
the modifyied date is the same. I am using the code shown below, however if
the sheet is open the last modifyied date becomes todays date. I changed the
program so that it closes the sheet without saveing and the problem is fixed.
Is it possible to keep the sheet open and return the last modifyied date?
If not, is there a way to reopen the last file that was closed with ease?

StrFileLocalDirectory = "C:\..."
strFileName = "Quote 1" ' Changes as the user selects different quotes
test1 = FileDateTime(StrFileLocalDirectory & strFileName)
test2 = FileDateTime(StrFileDatabaseDirectory & strFileName)
If test1 test2 Then ' If the modifyied date of the file in the database is
older than the one the user is trying to incert, replace the file in the
database.