inserting selected row in other sheet-macro question

V

Veggatron

Sub Macro7()
Selection.Copy
Sheets("Blad2").Select
Rows("101:101").Select
Selection.Insert Shift:=xlDown
End Sub

now the selection is pasted in "Blad2" in a new row which is inserted
at row 101. but i want the selection to be pasted after the LAST row.

it's not that hard i just can't seem to find it in the vast amount of
code google gives me when i do a search.

thnx in advance.
 
P

Paul B

Veggatron, try this

Sub Macro7()
Selection.Copy
Sheets("Blad2").Select
Range("A65536").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
V

Veggatron

just altered the A65536 to C65536 as that column is always filled with
data, column A isn't.

so it works fine now, thnx :)
 
D

David McRitchie

It's not all that generic with a specified sheetname, but you
might consider using modified to using column C

Cells(Rows.Count, 3).End(xlUp).Offset(1, 0).Select

just in case Excel supports more than 65,536 rows in the
future though I imagine that doing that efficiently will not be
in the lifetime of Excel but may be possible with extremely fast
machines to offset software design -- you never know.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Paul B said:
Veggatron, try this

Sub Macro7()
Selection.Copy
Sheets("Blad2").Select
Range("A65536").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 

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

Top