ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Paste Question (https://www.excelbanter.com/excel-programming/348628-paste-question.html)

Barb Reinhardt

Paste Question
 
I just can't figure out how to paste something that I've previously copied
into this selection. I've confirmed that last+1 and Last1 are real values.
DestSh is also not always the active sheet.

DestSh.Range("A" & Last + 1 & ":" & "A" & Last1).Select

I'm sure someone out there in the ether knows exactly what to do.

Thanks,
Barb

Tom Ogilvy

Paste Question
 
DestSh must be the activesheet if you are going to select a range within
that sheet.

DestSh.Activate
DestSh.Range("A" & Last + 1 & ":" & "A" & Last1).Select

Of course you can do a copy and paste without selecting the destination
range.

Other problems might be that your code alters something that clears the
clipboard before you get to your paste command although there is nothing in
the code you show that involves either a copy or a paste.

--
Regards,
Tom Ogilvy

"Barb Reinhardt" wrote in message
...
I just can't figure out how to paste something that I've previously copied
into this selection. I've confirmed that last+1 and Last1 are real

values.
DestSh is also not always the active sheet.

DestSh.Range("A" & Last + 1 & ":" & "A" & Last1).Select

I'm sure someone out there in the ether knows exactly what to do.

Thanks,
Barb





All times are GMT +1. The time now is 05:21 PM.

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