View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Macro to copy formula and paste into another

Private Sub Worksheet_BeforeDoubleclick(ByVal Target As Range, Cancel As
Boolean)
Dim n As Long
n = Target.Row
With Target
.Value = Excel.Range("D" & n).Formula
End With
Target.Offset(1).Select
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"usmc-r70" wrote:

I found and successfully loaded the following code, but I must use the ENTER
key for it to be fully posted.

Any idea?

Private Sub Worksheet_BeforeDoubleclick(ByVal Target As Range, Cancel As
Boolean)
n = Target.Row
With Target
.Value = Excel.Range("D" & n).Formula
End With
SendKeys "{ENTER}", True
End Sub