|
-
Dec 10th, 2003, 04:00 PM
#1
Thread Starter
Addicted Member
Moving Row (VBA - Excel) (Resolved)
Hi how could i move a row of data in vba?
I would like to move it from one sheet to another
Last edited by señorbadger; Dec 13th, 2003 at 02:19 AM.
-
Dec 10th, 2003, 09:30 PM
#2
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
-
Dec 11th, 2003, 09:10 AM
#3
Thread Starter
Addicted Member
Didnt work mate any ideas the problem is
runtime error 1004
select method of range class failed
the code it moans about is...
-
Dec 12th, 2003, 04:47 PM
#4
I tested the code and it works fine. Are you using the code in VB or VBA?
-
Dec 13th, 2003, 02:19 AM
#5
Thread Starter
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|