View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default adding date with double click

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 4 Then
Target.Value = Format(Date, "dd.mm")
End If
Cancel = True
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.


Gord Dibben MS Excel MVP


On Mon, 9 Apr 2007 12:34:03 -0700, excel-tr
wrote:

hi,

how can I add the day and month like 29.03 when I double click any cell in
column D ?

regards