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
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Yes it is possible using event code. In which range is the info entered and where should the date go?
 
Upvote 0
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
 
Upvote 0
Do you mean a userform? If so what is the code used to populate Sheet1?
 
Upvote 0
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?
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

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