ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PasteSpecial between workbooks (https://www.excelbanter.com/excel-programming/417342-pastespecial-between-workbooks.html)

Shahin Musayev

PasteSpecial between workbooks
 
Hi everyone!

I'm trying to write a macro to paste values. It works fine when I copy
and paste within one workbook, but it pasts formula when I try to
paste values copied from workbook A (=BalancePL!D32) to workbook B
(='[A]BalancePL'!D32). I must admit that it does it only in case one
cell is copied, when I copy more than one cell everything works
fine...

I tried lots of variants:

' First
Application.Selection.PasteSpecial Paste:=xlPasteValues

' Second
Application.ActiveWindow.RangeSelection.PasteSpeci al
Paste:=xlPasteValues

' Third
Application.ActiveSheet.PasteSpecial "Text"

but result is the same. Any help is appreciated.

Thanx,
Shahin

Don Guillett

PasteSpecial between workbooks
 
Post your code

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Shahin Musayev" wrote in message
...
Hi everyone!

I'm trying to write a macro to paste values. It works fine when I copy
and paste within one workbook, but it pasts formula when I try to
paste values copied from workbook A (=BalancePL!D32) to workbook B
(='[A]BalancePL'!D32). I must admit that it does it only in case one
cell is copied, when I copy more than one cell everything works
fine...

I tried lots of variants:

' First
Application.Selection.PasteSpecial Paste:=xlPasteValues

' Second
Application.ActiveWindow.RangeSelection.PasteSpeci al
Paste:=xlPasteValues

' Third
Application.ActiveSheet.PasteSpecial "Text"

but result is the same. Any help is appreciated.

Thanx,
Shahin



Shahin Musayev

PasteSpecial between workbooks
 
I already posted my code (see three variants in my previous post). It
is located in my personal workbook.


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

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