Date Function Prompting Save

Amy Beryl

Board Regular
Joined
May 5, 2011
Messages
54
Hi All -

I have a question about files that utilize the =Now() or =Today() functions. Is there a way to add in a current date function that doesn't prompt the user to save the file every time. Sometimes I bring up the file just to look at data in it and when I'm done it asks me if I want to save the file even though no data was changed. I think the file updates the date (or more specifically the time) within the date function and that constitutes a change to the file and thus asks for a save. Is there a way to have an auto-updating date function that dooesn't change after the first viewing in a day?

Amy
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Welcome to the board...

It would require VBA code, is that acceptable?


Press ALT + F11 to open the VBA editor.
Find the module on the left side labled ThisWorkbook - double click it.
Paste the following code (adjust sheetname and range to reflect where you want the date to go).

Rich (BB code):
Private Sub Workbook_Open()
With Sheets("Sheet1").Range("A1") 'Adjust sheetname and range as needed
    If .Value <> Date Then
        .Value = Date
    End If
End With
End Sub

Save / Close / Reopen the book


Hope that helps.
 
Upvote 0
I am not that sophisitcated with macros so I am uncomfortable installing this in spreadsheets that users who are even less sophisticated will be using. I take it there isn't a function that will display a date and not have an ever-updating time attached to it?

Thanks!

Amy
 
Upvote 0
Well, Today() does not contain the time...
But it's still volatile and recalculates upon opening.
And will prompt for save when closing.


There are no other functions to "automatically" put the date in a cell without prompting for save each time it's opened.
Sorry.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

We've detected that you are using an adblocker.

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.
Go back
Back
Top