• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

On Save, update cell to Today's Date

DonMinter

Member
I think I haven't posted in like 5 years... "Hello!" to anyone who remembers me.

I think the title is clear. I have a spreadsheet I wrote for our accounting department. It's just the expense reporting form.

Right now, I have a field with Today() in it for the date. This is fine when generating the form to be submitted - accounting requires hard copies still; however, I would like to actually have the date the form was printed and/or saved. I would not mind this being a button to insert today's date, then save and/or print the file.

Does anyone have some way to do this? I know about ctrl-semi, but this is actually for others to use, and a few of them don't use Excel often enough to remember how to enter the date. I would actually prefer some kind of "on Save" function to do this, but I'm open to suggestions. Even an "on change" function would work for me. Once the form is changed. The cell E20 will be blank, but it is the first cell to get data, so it will always have something in it when the form is submitted, but I think that on print is the proper time to change the cell.

Thanks in advance for any ideas.
 

AlanSidman

Well-Known Member
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("A1") = Date  'change this to whatever cell you want the current date to appear
End Sub
 
Top