marreco
08-21-2013, 07:19 PM
Hi.
I need to copy Range ("B28: Q35") to the last line of the tab "Plan1"
Sub copy_Data()
Dim rng As Range, WS As Worksheet
Dim n As Integer
Application.ScreenUpdating = False
With Sheets("TESTE2")
.Range("B28:Q35").End(xlUp).Copy
.[A65536].End(xlUp)(2).PasteSpecial Paste:=xlValues
End With
Sheets("Plan1").[A65536].End(xlUp)(2).PasteSpecial Paste:=xlValues
'the above lines are not working.
'I need to copy Range ("B28: Q35") to the last line of the tab "Plan1"
With Sheets("TESTE1")
Set rng = .Range("B28:Q35")
End With
I = 2
Sheets("Plan1").Rows(I).EntireRow.Resize(8).Insert
For Each WS In Sheets(Array("Plan1"))
rng.Copy Destination:=WS.Range("A2")
Next WS
Application.CutCopyMode = False
End Sub
I need to copy Range ("B28: Q35") to the last line of the tab "Plan1"
Sub copy_Data()
Dim rng As Range, WS As Worksheet
Dim n As Integer
Application.ScreenUpdating = False
With Sheets("TESTE2")
.Range("B28:Q35").End(xlUp).Copy
.[A65536].End(xlUp)(2).PasteSpecial Paste:=xlValues
End With
Sheets("Plan1").[A65536].End(xlUp)(2).PasteSpecial Paste:=xlValues
'the above lines are not working.
'I need to copy Range ("B28: Q35") to the last line of the tab "Plan1"
With Sheets("TESTE1")
Set rng = .Range("B28:Q35")
End With
I = 2
Sheets("Plan1").Rows(I).EntireRow.Resize(8).Insert
For Each WS In Sheets(Array("Plan1"))
rng.Copy Destination:=WS.Range("A2")
Next WS
Application.CutCopyMode = False
End Sub