PDA

View Full Version : VBA to cut & paste



omp001
12-12-2011, 08:26 AM
Hi.
I'm trying to cut and paste with the code below but 'Paste' and 'PasteSpecial' don't work.
The code does 'Cut' and then does 'Paste' but crashes after these.
Is there a way to get it to work?
thanks in advance

Sub test()
Range("A2:C2").Cut
With Sheets("Plan2")
.Rows(14).Insert
.Cells(14, 1).PasteSpecial
End With
End Sub

nilem
12-12-2011, 08:53 AM
Hi Osvaldo.Try it
Sub test()
With Sheets("Plan2")
.Rows(14).Insert
Range("A2:C2").Cut .Cells(14, 1)
End With
End Sub

omp001
12-12-2011, 09:32 AM
Hello, nilem.
Works great.
Thank you so much.