Private Sub Workbook_Open()
Dim rng as Range
set rng = ThisWorkbook.Worksheets("Sheet1").Range("A1")
if isempty(rng) then
rng.Value = Date + Time
rng.Numberformat:= "mm/dd/yyyy hh:mm:ss"
rng.EntireColumn.Autofit
End if
end Sub
Not sure what the situation is, but while this will write the date and time
in the cell, the workbook must be saved as well. You might want to prompt
for a path and filename at this time and save the file.
Put a macro like the above in the ThisWorkbook Module.
Chip Pearson's page on Events
http://www.cpearson.com/excel/events.htm