ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Paste special problem (https://www.excelbanter.com/excel-programming/275186-re-paste-special-problem.html)

Wild Bill[_2_]

Paste special problem
 
Perhaps the destination is locked? (Highlight a destination cell and
menu format/cells/protection to check)

On Sun, 24 Aug 2003 22:31:18 -0400, "Neal" wrote:

I am having a problem with a macro using Paste Special. I am copying part of a
column from one worksheet to another worksheet in the same workbook. After the
range is selected and the destination cell is selected in the receiving
worksheet the macro refuses to work if there is any data already in the
destination range. It works fine if the range is empty. There is no error
message. It just does not copy when there are entries in the destination range.
The actual Special paste operation uses:

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Is there anything I can add to this to make it write over any entries already in
the destination range?

Thanks
Neal



Neal[_3_]

Paste special problem
 
I already checked that and it is not locked. I experimented with it some more
and found that if I clear the first cell in the destination range or change it
to another value , the macro works fine. I can't figure out why this is
happening. If I do the copy and paste by hand, it works everytime.

Neal

"Wild Bill" wrote in message
...
Perhaps the destination is locked? (Highlight a destination cell and
menu format/cells/protection to check)

On Sun, 24 Aug 2003 22:31:18 -0400, "Neal" wrote:

I am having a problem with a macro using Paste Special. I am copying part of

a
column from one worksheet to another worksheet in the same workbook. After

the
range is selected and the destination cell is selected in the receiving
worksheet the macro refuses to work if there is any data already in the
destination range. It works fine if the range is empty. There is no error
message. It just does not copy when there are entries in the destination

range.
The actual Special paste operation uses:

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Is there anything I can add to this to make it write over any entries already

in
the destination range?

Thanks
Neal






All times are GMT +1. The time now is 10:35 AM.

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