auto update of date and time whenever changes are made to a xcel s

S

saran

Hi..
In the case of using auto update program for date and time thro vba editor,
the following error occurs
run time error 9.
This problem is more predominant in excel having more than one sheet.
Can u pl suggest what may b the problem.
 
S

sivak

Try this code. Put this code in the ThisWorkbook object.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = " " & Now
End Sub
 
Top