Macro to copy formula and paste into another
Correction, limit code response to any column other than D.
"Gary''s Student" wrote:
You need the SendKeys to get you out of cell edit. You can avoid this by
setting Cancel=True
Private Sub Worksheet_BeforeDoubleclick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
n = Target.Row
With Target
.Value = Excel.Range("D" & n).Formula
End With
End Sub
--
Gary''s Student - gsnu200856
"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
|