View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default is it possible to CLICK & insert date

Unfortunately, this will also change the date of previously date-stamped
cells if the user navigates to them using the keyboard. I think the OP would
be better advised to use the DoubleClick event; that way there's no
confusion:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As _
Range, Cancel As Boolean)
Cancel = True
If Target.Column = 1 Then Target.Value = Now
End Sub

--

Vasant





"Bob Phillips" wrote in message
...
Mike,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
Target.Value = Date
End If
End Sub

Insert this code in the appropriate worksheet module. Change the column
number for your target column. It will insert the date just by entering

the
cell.

--

HTH

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

"MIKE" wrote in message
...
is it possible to
flag a column as a date column
and when you click a cell the date AND time is
inserted ???