Why is a DOM Object Dependent on Internet an Explorer Application in VBA -
so have internet explorer object, , i'm using dom object after navigating page. (actually, i'm getting collection of dom form objects, i'm trying keep question generic possible.)
set ie = createobject("internetexplorer.application") ie.navigate (url) set dom = ie.document
then want quit ie la ie.quit
, , continue working new dom object. unfortunately, quitting ie seems empty out dom object of it's contents. there way stop happening? don't want leave ie open until end of program a) resource hog, , b) tends lead lot of unclosed instances in event of errors further down line. thanks, , sorry if answer turns out obvious (which feels might be, although did hunt around.)
i don't think can quit ie @ point holding object. unless i'm missing something, you're holding reference com object; com object isn't stored in application managed ie, when throw away ie, throw away object it.
i attempt hold onto dom shortest time possible if concerned resource utilization, if need access dom, need keep ie around.
if need parts of data, can of course pull out relevant bits dom, rid of ie , work on data pulled out.
Comments
Post a Comment