File date in a cell


Posted by Jeff on June 19, 2000 5:29 AM

I need to put the date last modified into a cell so that when the workbook is changed in any way it updates this cell. It would have to update before closing so trying to capture the filedate wont work untill it is opened again any ideas?

Posted by JAF on June 19, 0100 7:37 AM

Jeff

Put the following into the ThisWorkbook object:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = Now()
ActiveWorkbook.Save
End Sub


JAF

Posted by Sherlock on June 20, 0100 4:43 PM


Hello,

If you want to put the date last modified into a cell then do the followings :

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = Now()
ActiveWorkbook.Save
End Sub

Hope this helps you :-)

Regards,

Sherlock
holmes@qsupport.com



Posted by Bob Wheatley on September 03, 0100 5:53 PM

Please expand on how one "puts this into the THISWORKBOOK object"

Thanks
Bob
=================================================