Article ID: 193663
Article Last Modified on 6/17/2005
Private Sub Workbook_BeforeClose(Cancel As Boolean)
' Place the current date and time into cell A1 of Sheet1.
Worksheets("sheet1").Range("a1").Value = _
Format(Date + Time, "mm/dd/yy hh:mm")
' Save the current workbook.
ThisWorkbook.Save
End Sub
141563 XL: How to Create and Use an Auto_Close Procedure
176476 OFF: Office Assistant Not Answering Visual Basic Questions
Additional query words: XL98
Keywords: kbhowto kbdtacode KB193663