View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SIGE SIGE is offline
external usenet poster
 
Posts: 206
Default Pasting date in a range

Hi There,

I would like to Paste the Date in a cell when double clicking on it.
In a limited range: like D5:D25

Underneath code does not really do it for some reason...
How can I determine my range here? (eg: D5:D25)

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)
If Target.Column = 1 Then
Target.Value = Format(Now(), "mm-dd-yyyy")
Target.Offset(0, 1).Select
'I would like to jump to the cell on the rigth afterwards
End If
End Sub