Oops.., some typos...
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].., well 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 assign 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