Bassplayer
New Member
- Joined
- Oct 22, 2013
- Messages
- 11
Hello!
I´m having problem in creating a code to copy a row (values are variable) from one sheet to another sheet. I want only to move the rows within the interval 3 to 10. These cells are all in Column C. In the destination sheet the value should be inserted in the first blank row but that I can manage. The code I´ve made so far is:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim c As Integer
Dim r As Integer
c = Target.Column
r = Target.Row
If Target.Column <> 3 And Target.Row < 3 And Target.Row > 10 Then Exit Sub
Sheets("Folha1").Select
Rows(r & ":" & r).Select
Selection.Cut
Sheets("Folha2").Select
Rows("8:8").Select
Selection.Insert Shift:=xlDown
Sheets("Folha1").Select
End Sub
Can please somebody help me? Thanks in advance!
Best regards,
Ricardo
I´m having problem in creating a code to copy a row (values are variable) from one sheet to another sheet. I want only to move the rows within the interval 3 to 10. These cells are all in Column C. In the destination sheet the value should be inserted in the first blank row but that I can manage. The code I´ve made so far is:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim c As Integer
Dim r As Integer
c = Target.Column
r = Target.Row
If Target.Column <> 3 And Target.Row < 3 And Target.Row > 10 Then Exit Sub
Sheets("Folha1").Select
Rows(r & ":" & r).Select
Selection.Cut
Sheets("Folha2").Select
Rows("8:8").Select
Selection.Insert Shift:=xlDown
Sheets("Folha1").Select
End Sub
Can please somebody help me? Thanks in advance!
Best regards,
Ricardo