Automatic Populate Todays Date in Cell when File is Saved.

I am creating a user data entry spreadsheet in excel and I want to record the 
date in a specific field when the excel file is opened. I need the field 
"Submit Date" to be automatically populated and protected when a user opens 
the file and performs a save. If the user does not Save the file the date 
field should remain empty. Can anyone help with this please?
0
Nello (4)
3/2/2005 5:35:06 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
282 Views

Similar Articles

[PageSpeed] 29

Paste the following macro into the Workbook module.  You access the Workbook 
module by right-clicking on the Excel icon to the left of the word "File" in 
the menu across the top of the spreadsheet, select View Code.
    This macro will put the data in A1 if the user commands a save.  If you 
want the date and time, change the "Date" to "Now".   Is this what you want? 
HTH   Otto
"Nello" <Nello@discussions.microsoft.com> wrote in message 
news:2D269EDD-CCDD-4946-86C4-3AC677397007@microsoft.com...
>I am creating a user data entry spreadsheet in excel and I want to record 
>the
> date in a specific field when the excel file is opened. I need the field
> "Submit Date" to be automatically populated and protected when a user 
> opens
> the file and performs a save. If the user does not Save the file the date
> field should remain empty. Can anyone help with this please? 


0
ottokmnop (389)
3/2/2005 6:13:24 PM
Hi Otto

I do not see any code. Can you please resend?

"Otto Moehrbach" wrote:

> Paste the following macro into the Workbook module.  You access the Workbook 
> module by right-clicking on the Excel icon to the left of the word "File" in 
> the menu across the top of the spreadsheet, select View Code.
>     This macro will put the data in A1 if the user commands a save.  If you 
> want the date and time, change the "Date" to "Now".   Is this what you want? 
> HTH   Otto
> "Nello" <Nello@discussions.microsoft.com> wrote in message 
> news:2D269EDD-CCDD-4946-86C4-3AC677397007@microsoft.com...
> >I am creating a user data entry spreadsheet in excel and I want to record 
> >the
> > date in a specific field when the excel file is opened. I need the field
> > "Submit Date" to be automatically populated and protected when a user 
> > opens
> > the file and performs a save. If the user does not Save the file the date
> > field should remain empty. Can anyone help with this please? 
> 
> 
> 
0
Nello (4)
4/20/2005 4:19:02 PM
Oops!  I forgot to send the code.  I redid it after reading your last 
message.  This code consists of 2 macros.  The Open macro puts the date into 
a cell named SubmitDate when the file is opened.
The second macro may or may not be necessary but it removes the date if the 
file is closed without first being saved.  Let me know if this works for 
you.  Otto
Private Sub Workbook_Open()
    Range("SubmitDate") = Date
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    If ThisWorkbook.Saved = False Then _
        Range("SubmitDate").ClearContents
End Sub

"Nello" <Nello@discussions.microsoft.com> wrote in message 
news:569B2ECB-BD4E-4E92-86F1-B96ADD29DE80@microsoft.com...
> Hi Otto
>
> I do not see any code. Can you please resend?
>
> "Otto Moehrbach" wrote:
>
>> Paste the following macro into the Workbook module.  You access the 
>> Workbook
>> module by right-clicking on the Excel icon to the left of the word "File" 
>> in
>> the menu across the top of the spreadsheet, select View Code.
>>     This macro will put the data in A1 if the user commands a save.  If 
>> you
>> want the date and time, change the "Date" to "Now".   Is this what you 
>> want?
>> HTH   Otto
>> "Nello" <Nello@discussions.microsoft.com> wrote in message
>> news:2D269EDD-CCDD-4946-86C4-3AC677397007@microsoft.com...
>> >I am creating a user data entry spreadsheet in excel and I want to 
>> >record
>> >the
>> > date in a specific field when the excel file is opened. I need the 
>> > field
>> > "Submit Date" to be automatically populated and protected when a user
>> > opens
>> > the file and performs a save. If the user does not Save the file the 
>> > date
>> > field should remain empty. Can anyone help with this please?
>>
>>
>> 


0
ottokmnop (389)
4/21/2005 10:08:19 PM
Reply:

Similar Artilces:

Cannot save my form
Hi.Can you please help me with my problem.I create my database last week.At first,the database worked smoothly.But,when I when I reopen my database,my last forms was dissapeared.Can you help me to solve my problem?Any post will help.Thank you. When you open the database do you see the database window? If not press the F11 key. Next go to Forms on the objects bar. Do you see vertical or horizontal scroll bars? If so the new forms might just be a little off screen and using the scroll bars should find them. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bont...

Help for time saving!
Hi I have got created an Excel Script that creates a Word Document. A bill. But for only 8 bill entries the script needs to much time. For this entries it works about 30 secounds. If you want to help me look at this page: www.kluesener.info/excel.html And if you find anything that saves time please tell me how I can do it better. Sorry for my bad english Many Thanks Jens ...

MS Money 95 data files
I hope that some one can answer this for me. I have used MS Money 95 for years, and it works just fine for me on Windows XP, however, I now have to reformat my hard drive, and have discovered that I can nolonger find my original install disk. Will the latest versions of Money still read the MS Money 95 data files. All that I have ever used the program for is to track my investments, and am unlikely to do any different in the future. Thanks Stan B In microsoft.public.money, Stan Banner wrote: >I hope that some one can answer this for me. >I have used MS Money 95 for years, and...

move cell contents
Is there a way to move a cell contents to another cell with a formula. ex: if a5="Name" then move g5 to j5? Also, I am using =INDEX(Sheet1!B3:B12,INT((RAND()*10)+1),1) to pick random names from a list. I have the formula in different place pick random names from different list. This does work, but I have different list with some of the same names and with the random pick I do not want the same name to appear. -- Thanks for any and all help. Davidl Hi David a formula can only affect the cell it is in, it can't move or change another cell for this you need some code ...

Using part of a cell in a chart title
I have a chart which should get a title. However, this should be partly be used from a cell e.g. "counted with 5%" 5% should be taken from the cell and used in the title. Is this possible? Hi, Yes it's possible but all of the chart title needs to be in the cell. So you may need to use a helper cell and concatenate text and value. http://www.andypope.info/tips/tip001.htm Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Nicole" <Nicole@discussions.microsoft.com> wrote in message news:5CB7A971-AA7F-4C34-BB42-7DC283AA2958@micro...

visible cell only
I'd like to use the PERCENTILE function in a list that has been autofiltered and get the results based only on the visible cells. I've used SUBTOTAL in order to get count, average, min and max. But I need to get the .25 and .75 percentile figures for the filtered data (visible cells only). I've scoured these forums. I've scoured the web. I've found some vba code that was supposed to select only visible cells but it doesn't work for me. I posted last week in the programming section of these forums (and again this morning) but got no reply. I figure...

Can I send a recurring e-mail automatically each week
I want to send a e-mail with the same verbiage to the same person once a week and make it a recurrence with no end date. Can I set this up once in Outlook so it is scheduled automatically? -- Microsoft Office 2003 Version Students and Teachers Edition Windows Vista Home Premium Thank-you Happy new Year!! Carl R ...

how do I automatically update a text box in a chart?
Hi, You can link the textbox to a cell. When you update the cell the textbox should reflect this. Select the textbox border and then in the formula bar enter the complete cell reference, for example, =Sheet1!A1 Cheers Andy Kath wrote: -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

Drag and Drop file/directory names on Tree Control.
hi, I am writing an application in which i have one Tree control. Now i want that , when user drag & drop any file/folder on tree control the file name/folder name should be add in the tree control item. User may drag and drop file from desktop or may be from directory. I just want the path of that file/foder name nothing else. so plz tell me will it be possible ... Plz Help me............. Klic..... > I am writing an application in which i have one Tree control. >Now i want that , when user drag & drop any file/folder on tree >control the file nam...

what's the formula for adding symbols in cells?
I have a chart that has blank info in the legend. I want to add an * to indicate something, but just inserting a symbol doesn't work. Any ideas? Thanks. Debi - To add information to the legend, you need to add to a series name. Right click on the chart, select Source Data from the pop up menu, click on the series tab, select a series, and either type something in the name box, or click in it and select a cell with the mouse. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services http://PeltierTech.com/Excel/Charts/ _______ Debi wrote: > I have a chart tha...

"Save" preferences getting lost
List members: I work on long documents and want to save my work frequently. Every time I set the "Save" preference to a brief interval like five or ten minutes, the preferences seemingly resets itself to a default of thirty minutes. I'm using Word 2008 for the Mac on an Intel running 10.6.2. Thanks in advance for any thoughts. - Mark Pavlick Hi Mark: That indicates that your user ID does not have permission to write to the preference file that Word is using, or that something is replacing the preference file. With the help of your System...

Where is the workspace file stored?
I was given a project folder containing several dozen files. So where is the workspace file normally located? If I don't have a workspace file how can I cerate one? Using VC version 6. TIA I haven't used VC6 for some time, but if I remember right you can just open the .dsp file and it will create a .dsw file for you. It typically goes in the same folder with the code. Tom "Phisherman" <noone@nobody.com> wrote in message news:be93539ccf8a6f25ibh4vt6ggmtbi024mq@4ax.com... >I was given a project folder containing several dozen files. So where > is the wor...

Change File Locations to Private Drive (not Folder)
Hi, I know that I can use "File Locations" in "Options" so that whenever I use the "Open..." command in Word, it will open to a specific folder. I'm wondering if there is a way that this can be applied not to a folder but to a specific drive on a network. Our company has a main public drive and has also assigned each of the Staff their own private drive. Is there a way to access the "main page" (for lack of a better term) of my private drive each time I use "Open..." in Word? Right now it goes to "My Computer" or ...

cant start outlook pst file to large
Hi I hope somebody may be able to help im new to outlook and now I cant start outlook message says cannot open your default email folders pst file its too large as I cannot open outlook I cannot delete old folders See if this helps: http://support.microsoft.com/kb/296088 -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/outlook.html Author: The Lawyer's Guide to Microsoft Outlook 2007: http://tinyurl.com/ol4law-amazon "Ray" <Ray@discussions.microsoft.com> wrote in message news:B3B824DC-3C9B-4B1B-8EF3-61...

Unexpected error message on closing an Excel file
Suddenly I am getting the following message when I try to close a workbook: "Your formula contains an invalid external reference to a worksheet. Verify that the path, workbook, and range name or cell reference are correct, and try again" The mysterious thing is that it does not happen consistently and that, after I click OK after the above message, I can still save the file. What might be the cause of this error message and can the "invalid reference" be tracked down using one of the utility add-ins such as J. Walkenbach's PUP? If it only happens when you close ...

Automatic incremental of records
I have a table with several records and arranged serially, i.e 1,2,3 .....25. When I delete arecod like record number 3 I would like record number 4 to become record number 3. But in my case Record number 4 still remains serial number 4 although it is actually the third record. Is there a way it can be done automatically? njogus wrote: > I have a table with several records and arranged serially, i.e 1,2,3 > .....25. When I delete arecod like record number 3 I would like > record number 4 to become record number 3. But in my case Record > number 4 still remains serial number ...

How do I merge cells with multiple data values?
I've tried highlighting the two cells which are in the same row. It suggested that I format and align. Both of which I've tried. I keep getting the same error message, "The selection contains multiple data values. Merging into one cell will keep the upper-most data only." I need to make the cells one with all my information. Is this possible? Not knowing what you want to do, let me make a suggestion. Put all your data into the first cell and leave the second cell empty. Select both cells. Click on Format - Cells - Alignment tab. In the "Horizontal" b...

dates #5
Is there a formula to ad a numeric value to the name of a month. I am running a query in excel (pulling from an external source) and would like to sort as teh table refreshes by month and year. I have code to to do the refresh and the sort, but it sorts in alphabetical order. I was thinking a formula could place a numeric value to the month (1 = Jan, 2 = Feb, etc) and I can sort based on that. Is there an easy formula to do this. Thanks in advance Your easy formula could be: =MATCH(A1,{"Jan","Feb","Mar","Apr","May","Jun"...

Can you only merge up to a certain number of cells
I am working on microsoft excel 2003, I have a sheet that I merged cells starting with line 8 through 43...when I type my information in the merged area I can see all that I am typing...say it goes up to line 30 once I hit the enter key I can only see up to line 20. Even when I print it out it only prints up to line 20...I have checked to make sure there are not locked cells etc. I cannot figure out at all why this is happening...is there only up to a certain number of cells you can merge? From "Excel Specifications and Limits" Length of cell contents (text) ...

Convert date
How can I convert a date in this format (mm-dd-yyyy) to a Julian-date (i.e., YYYYDDD)? For example: 09-13-2003 to 2003256 Hi see: http://www.cpearson.com/excel/jdates.htm -- Regards Frank Kabel Frankfurt, Germany gary wrote: > How can I convert a date in this format (mm-dd-yyyy) to a > Julian-date (i.e., YYYYDDD)? > > For example: 09-13-2003 to 2003256 On Wed, 8 Sep 2004 10:24:57 -0700, "gary" <anonymous@discussions.microsoft.com> wrote: >How can I convert a date in this format (mm-dd-yyyy) to a >Julian-date (i.e., YYYYDDD)? > >For exa...

formating date from general2 custom
I have an input xls file with the date but like this: Wed May 14 00:00:00 GMT-05:00 2008 I need to have just following format dd/mm/yyyy I tried to format it using Format->Cells->Date or Format->Cells- >Custom but this is failing. Nothing changed. Any ideas? Thanks for the help. Vlad <vladimir.vaynshtok@gmail.com> wrote in message news:1013b138-352b-4799-81ba-9508b74a1850@t54g2000hsg.googlegroups.com... >I have an input xls file with the date but like this: > > Wed May 14 00:00:00 GMT-05:00 2008 > > I need to have just following format > > d...

Font dosen't revert back to original after typing in date
Example I n my text I type I have December 28th The th automatically reduces to a much smaller font and once you hit the sapce bar to continue it reverts back to the larger font. It only does this some of times, why is this being so inconsistent?. I refortmated my comp. last week and when I reinstalled office I was hoping this inconsistent problem would have been resloved, but no 2nd question please. When I post a question in "discussion group" and check the box "Notify me of Replies" I never receice a reply to my question I then have to go back to ...

opening .bak file
Hi, I hope someone can help! I recently was performing a compacting operation on my outlook express folders. My computer shutdown due to a power failure and I lost some emails from a few of my folders. I was however able to get the .bak files (of the .dbx files that were lost) out of the recycle bin. If I could open one of these .bak files or convert it back to the .dbx file from which it was created I would retrieve these emails. Can anyone instruct me as to open this .bak file? Thanks for any help! Arnie K. How did you get the bak files out of the Recycle Bin? All e...

Trying to read XML file into dataset
Hello. Developing a web site in VS2005, SP1, VB, .NET 2.0, ASP.NET 2.0 on XP Pro, SP2. I eventually want to use a gridview table to view xml data, but right now i can't seem to get my xml data into a dataset so that i can use it. I have an XML file and can open it in IE. There is no XSD or XSL file to go with it. I can't seem to get the XML data into a dataset. I tried using the following code, but it just does nothing. It doesn't give an error. It just executes the code and does nothing. Dim dataSet As DataSet = New DataSet dataSet.ReadXml("...

saving and distributing a customized desktop
If there a way to customize one desktop and then copy the file to the other workstations so that they are set up the same way? I get calls all day from our users asking that I customizes their outlook to include some of the modifications I've made to my desk. We have Exchange Server and Outlook 2003 SP2. "Herb Segal" <herb@endlar.com> wrote in message news:Olsb5oBpKHA.5508@TK2MSFTNGP02.phx.gbl... > If there a way to customize one desktop and then copy the file to the other > workstations so that they are set up the same way? > > I get c...