Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 (see examples of code below): ' 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I couldn't duplicate the problem. This paste values a single cell between
workbooks with no problems. Workbooks("Book1").Worksheets("Sheet1").Range("B2" ).Copy Workbooks("Book2").Worksheets("Sheet1").Range("B2" ) _ .PasteSpecial xlPasteValues -- Jim "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 (see examples of code below): | | ' 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why need to use Selection.PasteSpecial vs myRange.PasteSpecial | Excel Programming | |||
PasteSpecial | Excel Programming | |||
PasteSpecial | Excel Programming | |||
pastespecial | Excel Programming | |||
vba pastespecial | Excel Programming |