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: 279
Default Copying/cloning an object

I do a lot of scraping information into Excel 2003 from the Internet via
Internet Explorer (IE).

[I find that I can safely open an instance of IE and make 100
interactions. If I set the limit as 200 interactions, IE sometimes fails
and Excel stops until I manually acknowledge the failure.]

I would like to do overlapped IO. Grab the first piece of data from IE,
copy it, send for the second piece of data and find it available when I
come to process it.
However, I find I have a misunderstanding of the Set Statement. It does
not take a copy of an object; it increases the reference count to the
object.
How do I copy an object?

My outline code is

Public ie As SHDocVw.InternetExplorer ' Needs
Tools/References/Microsoft Internet Controls

TxURLretry disambiguator & ActiveCell ' Sets ie
Set ieCopy = ie ' This does not copy ie
TxURLNavigate disambiguator & ActiveCell(2, 1) ' Sets ie
' That call changes ie and ieCopy.

I could possibly open 2 instances of IE, but the code for that is likely
to be significantly more complicated.

I have several requirements, where overlapping is likely to be useful.
One consists of ~1400 interactions, where each ~2 second interaction is
followed by ~4 seconds of processing.
Another consists of ?20K 2 second interactions. Overlapping the IO could
lead to a potential saving of ~6 hours.

I've done a bit of Googling on this.
Wikipedia has "There is no built-in method for deep copies of Objects in
VBA".
A Visual Basic DoCmd.CopyObject Method might be usable to those with the
skill.

I think I may have to adopt a 2 instance method.

I already tried running 2 instances of Excel, each on half the data.
I had to do some post-processing, and was not convinced the effort was
justified.
--
Walter Briscoe
 
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
How do I code the cloning of an object in vba? sarndt Excel Programming 1 March 17th 10 07:05 PM
Cloning an object which contains a collection deltaquattro Excel Programming 0 March 17th 10 04:11 PM
cloning sheets maisonvi Excel Discussion (Misc queries) 1 June 28th 08 09:58 AM
file cloning shnim1 Excel Discussion (Misc queries) 1 December 8th 05 03:00 PM
Best method of cloning the contents of a worksheet. Marie1uk Excel Worksheet Functions 2 July 6th 05 05:20 PM


All times are GMT +1. The time now is 08:09 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"