Copy row to another sheet in excel using VBA -


First of all, I have never used VBA (or VB for that matter), so keep this in mind . I am trying to copy a line in my workbook. So whenever a line is changed to 1, in Sheet 1, then the line should be copied to row 2 on sheet 2. If line 3 is modified in Sheet 1, then line 5 should be modified to Sheet 2. I want to have an empty line between each row on Sheet 2. I am trying to create a new table with VBA to put this blank line inside. Anyways, I'm getting an error on my selection. Paste line I have very limited knowledge (one hour value) on VBA, so I can completely stop what I am trying to do.

  Private Sub worksheet tags (by-target in range form) 'Do not worry about the column header if the target.Row = 1 exit again' ErrHandler application.EnableEvents 'sub error' = False 'can it be necessary? Sheet1. Ro (target.line) Select the selection. Copy sheet 1. Ro (target line). If copy target Line = 2 then Sheet2. Ro (target line). Select the selection. Select Paste Sheet 2 Select Sheet2 Row (target row + target row-1). Select the selection. Paste and if IrDAdiler: App.Active Aventant = True 'can it be necessary?  Selection while changing   

Edit: Paste to ActiveSheet.Paste , it is now working.

Edit: Added task with multi-field selections

  Range the range as a range of private sub-worksheetsshanks (Volt targets in the form of Range), each in the form of range for selection. In R for each RW Ro Ro Ro; = 2 then RW Enterro Copy Sheet 2 (2 + (rw.Row - 2) * 3, 1) End if next RW Next A and Sub    

Comments