Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've reviewed quite a few posts on this topic but I wonder if my particulars are causing the problem. I did find some something about this breaking when pasting between worksheets.
One computer uses WinXp, Excel 2003, .xls spreadsheet Other computer uses Win7, Excel 2010, compatibility mode .xls spreadsheet On the XP computer, this coding (which copies material from a Word document and pastes it into Excel) breaks occasionally, but on the Win7 computer it breaks frequently, almost continuously. This is the section that is breaking: ws1.Activate Set rNewWord = ws1.Range("L1") rNewWord.PasteSpecial (xlPasteValues) <----ALWAYS THIS LINE The curious thing is that it is not a true break - if I hit Debug and then Run, it continues merrily along until it breaks again - sometimes on the next loop (more in Win7), sometimes in 5000 loops (more in WinXP). Everything is dimmed and set. Because this is a large macro extracting 100k strings, I have this set up to clear the clipboard (copy/paste without using the clipboard didn't seem possible between applications). If lLoop = 100 Then Call ClearClipboard lLoop = 0 End If I don't think this is the problem; I'm just letting you know in case anybody thinks it might be because the clipboard is full. Any thoughts would be appreciated. Thank you! Susan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run Time error 1004 - Pastespecial method of range class failed. | Excel Programming | |||
Run-time error '1004': PasteSpecial method of Range class failed | Excel Programming | |||
Run-Time error'1004' PasteSpecial Method of Worksheet class failed | Excel Programming | |||
runtime error 1004 pastespecial method of range class failed | Excel Programming | |||
Run-time error '1004' PasteSpecial Method of Range Class Failed | Excel Programming |