Copy problems

  • Thread starter Thread starter WTG
  • Start date Start date
W

WTG

Thanks Joel,

I tried it, but I kept coming up with debug errors. and I don't know
much about what I was doing. :(

I have been searching and Came up with this,

Private Sub CommandButton1_Click()
LastRow = Sheets("Invoice").Range("A65536").End(xlUp).Row + 1
Range("A6:H32").Select
Selection.Copy
Sheets("Summary").Select
Range("LastRow").Select
ActiveSheet.Paste

End Sub

But this gives me debug errors to :(
 
This might work better:

Private Sub CommandButton1_Click()
LastRow = Sheets("Summary").Range("A65536").End(xlUp).Row + 1
Range("A6:H32").Select
Selection.Copy
Sheets("Summary").Select
Range(LastRow).Select
ActiveSheet.Paste

End Sub
 
i'd try this

Private Sub CommandButton1_Click()
Dim lastrow As Long
Dim wk1 As Worksheet
Dim wk2 As Worksheet
Set wk1 = Worksheets("Sheet1")
Set wk2 = Worksheets("Summary")
lastrow = wk2.Range("A65536").End(xlUp).Row + 1
wk1.Range("A6:H32").Copy _
wk2.Range("A" & lastrow)
End Sub
 
Check your other post, too.
Thanks Joel,

I tried it, but I kept coming up with debug errors. and I don't know
much about what I was doing. :(

I have been searching and Came up with this,

Private Sub CommandButton1_Click()
LastRow = Sheets("Invoice").Range("A65536").End(xlUp).Row + 1
Range("A6:H32").Select
Selection.Copy
Sheets("Summary").Select
Range("LastRow").Select
ActiveSheet.Paste

End Sub

But this gives me debug errors to :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top