Click a cell and update to current time / date ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does Excel have following feature for a cell?
Only I click a cell A1 with enter or another ways , then the cell A1 will
display the current time / date?
therefore, I will know when I work with this spreadsheet last time, but it
required o click cell A1 to get updated.
Does anyone know whether excel has this feature?
Thank you in advance
Eric
 
Hi Eric,

As you Click is used to select a cell, But it is possible with Double
Click event :

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
With Target
If .Cells.Count > 1 Then Exit Sub
If Intersect(.Cells, Me.Range("A1")) Is Nothing Then Exit Sub
If .Column = 1 Then
.Interior.ColorIndex = 6
End If
.Value = Date
End With
End Sub

HTH
Cheers
Carim
 
Ctrl-semicolon will enter the current date in a selected cell.....
Ctrl-Shift-Colon will enter the current time.....

hth
Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top