Question about dates

Urlord

Board Regular
Joined
Aug 5, 2010
Messages
130
Is it possible to have a date entered automatically entered on a form created in Excel but prevent that date from changing the next day.
I have a spreadsheet to trace customer complaints and I would like the date to be automatically entered when the info is recorded but not change after the form is complete.

Thanks
 

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Yes it is possible using event code. In which range is the info entered and where should the date go?
 

desdd57

New Member
Joined
Oct 7, 2009
Messages
49
I have the same question, but would like to also relate that to time.

Des
 

Urlord

Board Regular
Joined
Aug 5, 2010
Messages
130

ADVERTISEMENT

Yes it is possible using event code. In which range is the info entered and where should the date go?
Not quite sure what you are asking but I will explain a much as I can
I have created a form ( Form 1 ) with cells that automatically updates cells in sheet 1. I would like a blank form to automaically have today's date entered into cell j5 ( I know you can use today() to accomplish this ) I would like lock this date into j5 once other fields have been filled out.

Hope this helps
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Do you mean a userform? If so what is the code used to populate Sheet1?
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
So it isn't a userform.

Which is the final cell that you complete on your 'form' and which cell in Sheet1 should contain the date?
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Right click the tab of your form, select View Code and paste into the white space on the right

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "B31" Then Sheets("Sheet1").Range("B3").Value = Date
End Sub
then press ALT + Q to close the code window.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,595
Messages
5,512,300
Members
408,886
Latest member
kashifziatevta423

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top