In the ThisWorkbook of the VBA Project
Change the general to workbook and then select the beforesave procedure. Copy in the sheets("sheet1")...... line below
Where "sheet1" is the name of your sheet and ("a1") is the cell you want to put the date in
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Sheets("sheet1").Range("a1").Value = Date
End Sub
If you are new to VBA then the following step by step should help
Select [Tools]
[Macro]
[Visual Basic Editor]
Double click on Thisworkbook (Bottom of VBA list of sheets)
On the right hand side window at the top you will see General
Click on the arrow next to it and select Workbook
Private sub workbook_open() will appear
On the top right side where the word open is click on the arrow
and moving up select before_save
and then copy in the line that save the date into the cell.
Every time the workbook is saved the date will appear in the cell
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.