Insert date

Shaggie

New Member
Joined
Jul 10, 2007
Messages
7
I want to insert the date in a workbook when it is opened. but when i open it in a week i dont want the date to update.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
but when i open it in a week i dont want the date to update

So when do you want it to be updated?
Not updated until seven days after the last update, or updated every time(if any) until seven days from the first opening?
If the latter, when the workbook is opened more than seven days after the last update, what do you want to happen?
 
Upvote 0
i dont want the date to change ever.

i dont want the date to change ever.
what happens is i create a report and email it to my boss everyday and if i put the today() cmd in if he dont open it for a couple days when he opens it it has the current date and he is calling me wondering where the last 3 days reports are
 
Upvote 0
Welcome to the Board!

You can use the Open event with a test to see if the date's already there:

<font face=Tahoma><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_Open()
    <SPAN style="color:#00007F">Dim</SPAN> rng <SPAN style="color:#00007F">As</SPAN> Range
        <SPAN style="color:#00007F">Set</SPAN> rng = Sheets("Sheet1").Range("A1")
        
        <SPAN style="color:#00007F">If</SPAN> LenB(rng) = 0 <SPAN style="color:#00007F">Then</SPAN> rng = <SPAN style="color:#00007F">Date</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

Hope that helps,

Smitty
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,839
Members
449,051
Latest member
excelquestion515

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