ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   pasting copied cells (https://www.excelbanter.com/excel-programming/357501-pasting-copied-cells.html)

oercim

pasting copied cells
 
I have a problem excel macro. I want to paste some previously
copied rows into another sheet. Bu not into location "A1" of the sheet,
I want it to paste into A10. I made a code as below.

Sheets("a").Activate
Sheets("a").Rows("A10").Select
ActiveSheet.Paste

But it dosnt work, it pastes the rows to "A1". Why? Thanks a
lot.


Ron de Bruin

pasting copied cells
 
No need to activate
Copy example fton sheets b to a

Sheets("b").Rows("50:52").Copy Sheets("a").Range("A10")



--
Regards Ron de Bruin
http://www.rondebruin.nl


"oercim" wrote in message oups.com...
I have a problem excel macro. I want to paste some previously
copied rows into another sheet. Bu not into location "A1" of the sheet,
I want it to paste into A10. I made a code as below.

Sheets("a").Activate
Sheets("a").Rows("A10").Select
ActiveSheet.Paste

But it dosnt work, it pastes the rows to "A1". Why? Thanks a
lot.




Gazeta

pasting copied cells
 

Uzytkownik "oercim" napisal w wiadomosci
oups.com...
I have a problem excel macro. I want to paste some previously
copied rows into another sheet. Bu not into location "A1" of the sheet,
I want it to paste into A10. I made a code as below.

Sheets("a").Activate
Sheets("a").Rows("A10").Select
ActiveSheet.Paste

But it dosnt work, it pastes the rows to "A1". Why? Thanks a
lot.


try to change Sheets("a").Rows("A10").Select into
Sheets("a").Range("A10").Select
mcg



Jim Thomlinson

pasting copied cells
 
A better way might be something like

Sheets("b").Range("A100").Copy Sheets("a").Range("A1")

copies cell a100 from sheet b to cell a1 in sheet a...
--
HTH...

Jim Thomlinson


"oercim" wrote:

I have a problem excel macro. I want to paste some previously
copied rows into another sheet. Bu not into location "A1" of the sheet,
I want it to paste into A10. I made a code as below.

Sheets("a").Activate
Sheets("a").Rows("A10").Select
ActiveSheet.Paste

But it dosnt work, it pastes the rows to "A1". Why? Thanks a
lot.




All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com