PC Review


Reply
Thread Tools Rate Thread

adding date with double click

 
 
=?Utf-8?B?ZXhjZWwtdHI=?=
Guest
Posts: n/a
 
      9th Apr 2007
hi,

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

regards
--
SAHRAYICEDIT-ISTANBUL
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      9th Apr 2007
Paste this in Worksheet code:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Intersect(Target, Range("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

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      9th Apr 2007
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 <(E-Mail Removed)>
wrote:

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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to double-click for data to be recognised as date?! HierkommtdieMau Microsoft Excel Misc 3 28th Mar 2006 11:17 AM
double click insert date Slobodan Microsoft Excel Worksheet Functions 1 16th Feb 2006 01:28 PM
Error on double click for adding values Ladi Microsoft Access Form Coding 0 3rd Feb 2006 08:45 AM
how do i make it fill the date if i double click? =?Utf-8?B?VHdpbkRhZA==?= Microsoft Access Forms 3 30th Oct 2005 03:52 AM
Double-click date entry RJH Microsoft Excel Programming 2 30th Jan 2004 04:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:52 AM.