View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Adding Time via mouse button

put the code into a worksheet event - double click - you sure you want to do
this?

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
With Target
.FormulaR1C1 = "=NOW()"
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
Application.CutCopyMode = False
End Sub


--
Cheers
Nigel



"Taz" wrote in message
. uk...
I want to insert the TIME into a cell by the click of
the mouse button.

What do I neen to add to the beginning of
this formula

Sub Macro3()
'
' Keyboard Shortcut: Ctrl+x
'
ActiveCell.FormulaR1C1 = "=NOW()"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub


--
Taz