I need to display the date and time a spreadsheet was last saved each time the sheet is opened. I use the following function and incorporate it as shown
The problem is that when the file is opened is displayes the current date and time not the last time the file was saved.
Public Function myDate()
myDate = Format(FileDateTime(Application.ActiveWorkbook.FullName), "mm/dd/yyyy h:n ampm")
Private Sub Workbook_Open()
Sheet1.Range("D38") = myDate
How would I fix this?
I've done a fair amount of Googling about as well as looking through the Excel VBA code here on VBF and the general consensus seems to be that using FileDateTime is the way to go....but it doesn't want to play the way Uncle Hack needs it to play.