inserting selected row in other sheet-macro question

  • Thread starter Thread starter Veggatron
  • Start date Start date
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.
 
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 **
 
just altered the A65536 to C65536 as that column is always filled with
data, column A isn't.

so it works fine now, thnx :)
 
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.


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 **
 
Back
Top