Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding date with double click
hi,
how can I add the day and month like 29.03 when I double click any cell in column D ? regards -- SAHRAYICEDIT-ISTANBUL |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding date with double click
Paste this in Worksheet code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("D:D")) Is Nothing Then Else Target.Value = Now() Target.NumberFormat = "dd.mm" End If Cancel = True End Sub -- Gary''s Student - gsnu200714 "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 -- SAHRAYICEDIT-ISTANBUL |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I code a cell to display the current date on double-click? | Excel Programming | |||
Need to double-click for data to be recognised as date?! | Excel Discussion (Misc queries) | |||
double click insert date | Excel Worksheet Functions | |||
double click a cell with Date format | Excel Discussion (Misc queries) | |||
Double-click date entry | Excel Programming |