Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Is there a way to date stamp a cell by clicking on it and not hae it change
the next time that you open the file? Thank you |
#2
![]() |
|||
|
|||
![]()
For today's date:
Ctrl + ; or for the time: Ctrl + Shift + ; -- Regards - Andy Wiggins FCCA www.BygSoftware.com Excel, Access and VBA Consultancy "Chris" wrote in message ... Is there a way to date stamp a cell by clicking on it and not hae it change the next time that you open the file? Thank you |
#3
![]() |
|||
|
|||
![]()
You'd have to use an event macro for this. The
Worksheet_SelectionChange() event will fire on a single click, but it will also fire if you tab or arrow into the cell. I'd suggest using the Worksheet_BeforeDoubleClick() event (right-click your worksheet tab and choose View Code): Private Sub Worksheet_BeforeDoubleClick( _ ByVal Target As Excel.Range, Cancel As Boolean) With Target If Not Intersect(.Cells, Range("B:B")) Is Nothing Then If IsEmpty(.Value) Then Application.EnableEvents = False .Value = Date .NumberFormat = "dd mmm yyyy" Application.EnableEvents = True Cancel = True End If End If End With End Sub The first time a cell in the specified range (e.g., column B) is double clicked on, the date is inserted. Subsequent double clicks act as normal (i.e., enter Edit mode). In article , "Chris" wrote: Is there a way to date stamp a cell by clicking on it and not hae it change the next time that you open the file? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Separating date from a Date & Time stamp | Excel Discussion (Misc queries) | |||
Can excel have a button to input (stamp) the systems date and/or . | Excel Worksheet Functions | |||
How do I set an automatic date stamp into a cell in Excel? | Excel Worksheet Functions | |||
bringing data from one workbook to another using a date stamp func | Excel Worksheet Functions | |||
can you date time stamp entries in excel | Excel Discussion (Misc queries) |