View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Copy from ActiveRow, Paste to A2 in Another Sheet

A bit confusing. Do you mean copy a single row (which is the target row) and
is sheet Master the active sheet . Then try the below. Event for master sheet

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
Application.EnableEvents = False
Rows(Target.Row).Copy
Sheets("Summary").Range("A2").PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
'OR to copy with formats
'Rows(Target.Row).Copy Sheets("Summary").Range("A2")
'Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"ryguy7272" wrote:

I am trying to copy a row (could be any row) from a sheet named €˜Master and
paste to another sheet, named €˜Summary, in the same workbook, and
PasteSpecial in Cell A2.

Below is the code that I'm trying to implement:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim Currrow As Range
Currrow = Range("A2" & .Row & ":V" & .Row)
Worksheets("Master").Range("A" & Currrow & ":V" & Currrow).Copy
Worksheets("Summary").Range("A2").PasteSpecial
End Sub

It would be the entire row; doesn't matter. The data goes from A:V.

Thanks,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.