LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default PasteSpecial method of Range class failed Error 1004

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Time error 1004 - Pastespecial method of range class failed. oli merge Excel Programming 3 February 1st 10 01:46 PM
Run-time error '1004': PasteSpecial method of Range class failed Conan Kelly Excel Programming 1 August 7th 08 11:21 PM
Run-Time error'1004' PasteSpecial Method of Worksheet class failed gj[_2_] Excel Programming 0 July 31st 06 11:43 AM
runtime error 1004 pastespecial method of range class failed dreamz[_29_] Excel Programming 5 February 3rd 06 02:57 PM
Run-time error '1004' PasteSpecial Method of Range Class Failed Kevin G[_2_] Excel Programming 1 February 3rd 04 05:01 AM


All times are GMT +1. The time now is 10:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"