ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Save Date & Time (https://www.excelbanter.com/excel-worksheet-functions/125077-save-date-time.html)

mickey

Save Date & Time
 
Does anyone know of a way to insert the last save date and time in a cell in
an Excel worksheet?

Nick Hodge

Save Date & Time
 
Mickey

You could use a workbook_Beforesave() event, like so

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

To get into workbook, right-click the workbook excel icon second down top
left and select view code, paste here

Change worksheet and cell ref to suit

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"mickey" wrote in message
...
Does anyone know of a way to insert the last save date and time in a cell
in
an Excel worksheet?



mickey

Save Date & Time
 
Thanks Nick

"Nick Hodge" wrote:

Mickey

You could use a workbook_Beforesave() event, like so

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

To get into workbook, right-click the workbook excel icon second down top
left and select view code, paste here

Change worksheet and cell ref to suit

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"mickey" wrote in message
...
Does anyone know of a way to insert the last save date and time in a cell
in
an Excel worksheet?



Nick Hodge

Save Date & Time
 
Pleasure

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"mickey" wrote in message
...
Thanks Nick

"Nick Hodge" wrote:

Mickey

You could use a workbook_Beforesave() event, like so

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

To get into workbook, right-click the workbook excel icon second down top
left and select view code, paste here

Change worksheet and cell ref to suit

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"mickey" wrote in message
...
Does anyone know of a way to insert the last save date and time in a
cell
in
an Excel worksheet?





All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com