Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Copy failure spreading to VBA. Please help

$
0
0

I posted on this a year ago, and got no effective answer, and now it is getting worse.  I have uninstalled Skype.  Running Excel 2010

What was happening is that, with no pattern I could discern, I would hit control-C on a selected range, and instead of the dotted outline showing me what has been put on the clipboard, I would get nothing.  Pasting would fail because nothing was copied. 

Now I have this code snip:

Range("a4:h" & lastrow).Copy
        Sheets(cumulate_ws).Select
        lastrow = Range("B65536").End(xlUp).Row + 1
    Debug.Print lastrow
    Range("B" & lastrow).Select
        Selection.PasteSpecial Paste:=xlPasteValues

The paste fails with1004-PasteSpecial method of Range class failed.

I step through the code and sure enough, when I get to Range("a4:h" & lastrow).Copy, instead of getting a dotted outline around that range, I get a solid outline for a split second, which disappears.  It does not copy the data to the clipboard.  This is not consistent, it is not always reproducible.

What the heck?  Copy and paste is simple simple stuff.

Thanx


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>