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

I agree with Joe that the issue lies more likely with 'Copy' since
Paste or PasteSpecial will always throw an exception if the Clipboard
is empty.

As for using arrays in VB[A].., wel it can get rather wieldy if you're
not careful. I don't use Word and so don't know enough about its
objects/methods to explain how to pull text from a document into an
array, but I'm sure you'll find lots about that in word groups. Once
the text is loaded it's a trivial task to assing values to ranges. In
Excel we put a range into a Variant type variable and it results in a
2D, one-based array that we can iterate for values based on row/col
index within the array.

If, as you say, you have 100Ks of strings to process then acessing the
worksheet one by one will take a monumental length of time compared to
working with an array and 'dumping' the results into the worksheet<g.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




 
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:20 AM.

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"