current date

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

Guest

I would like to figure out how to get the current date into a cell when a
user clicks the cell.

Thanks,
Tricia Gall
 
right click sheet tab>view code>insert this>save
now when you select cell a2 the date will be today

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address <> "$A$2" Then Exit Sub
Target = Date
End Sub
 
Thanks!!!!

Don Guillett said:
right click sheet tab>view code>insert this>save
now when you select cell a2 the date will be today

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address <> "$A$2" Then Exit Sub
Target = Date
End Sub
 

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

Similar Threads

calendar 4
check boxes 1
backup 6
Excel is changing date format incorrectly 7
printing fonts 3
Find Date cell using Calendar Control 1
condensing an email list 1
comparing column values 4

Back
Top