View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default "Excel - Get Date"

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
With Target
.Value = Format(Date, "dd mmm yyyy")
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

This is worksheet code, so to enter it, right-click on the sheet tab, select
View Code from the menu, and paste the code.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Fraggs " wrote in message
...
Is there a way to have a cell so that when it is clicked on or something
it automaticaly enters the date. Probs get it off the computer clock
or something?


---
Message posted from http://www.ExcelForum.com/