Hi how could i move a row of data in vba?
I would like to move it from one sheet to another
Printable View
Hi how could i move a row of data in vba?
I would like to move it from one sheet to another
Is this what you're after?
VB Code:
Private Sub Command1_Click() Rows("4:4").Select 'Select row 4 Selection.Copy ' Copy row 4 Sheets("Sheet2").Select 'Select new sheet Range("A3").Select ' select where to paste on new sheet ActiveSheet.Paste ' paste End Sub
Didnt work mate any ideas the problem is
runtime error 1004
select method of range class failed
the code it moans about is...
Code:Rows("4:4").Select
I tested the code and it works fine. Are you using the code in VB or VBA?
O it was in VBA Excel BTW
Thanks all one of the mvp's helped me with this
VB Code:
Sheet5.Cells(counter1,1).EntireRow.Copy Destination:=Sheet3.Cells(10,1)
thanks again Sam Lad