LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Copying/cloning an object

Here's how I reuse object refs...

Public oIE As SHDocVw.InternetExplorer

Set oIE = New SHDocVw.InternetExplorer '//create instance
'//use the instance for some processes
Set oIE = Nothing '//destroy the instance

...where each time the object is needed a new instance gets
created/used/destroyed. This usually requires some process to make
repeated calls to the process using the object, and so you may need to
restructure code accordingly.

HTH

--
Garry

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

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

 
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 07:12 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"