do i need to need to clear(set to nothing) an OLE link
Hello
I was wondering if i needed to clear (set to nothing) an OLE link.
I have the following code
VB Code:
link = "c:\mycars\fastcars.xls!output!R6C2:R38C3" 'fixed for phase1
OLE2.CreateLink (link)
do i need to do
set OLE2 = nothing or set link = nothing in the form_unload method?
Re: do i need to need to clear(set to nothing) an OLE link
Re: do i need to need to clear(set to nothing) an OLE link
Someone with more experience in using OLE Links could be more definitive. This is just an opinion, but it couldn't hurt. :)
Re: do i need to need to clear(set to nothing) an OLE link
Set your OLE object to nothing after you are done with it. Do make sure you actually close your workspace if you are using any office OLE functionality or risk either pop ups from Office or losing data.
Re: do i need to need to clear(set to nothing) an OLE link
hack, i got little experience with OLE's :)
the OLE is an embedded link(?) in one of my forms, it is
a class Excel.Sheet.8
how do you set your OLE pbject to nothing
what do you mean by closing the workspace?
Re: do i need to need to clear(set to nothing) an OLE link
Use the .Close method, or something like it.
To set it to nothing, you posted the code yourself ;)
Re: do i need to need to clear(set to nothing) an OLE link
you mean to say i should do the following
VB Code:
OLE2.close
set OLE2 = nothing
?
Re: do i need to need to clear(set to nothing) an OLE link
Quote:
Originally Posted by vb_student
you mean to say i should do the following
VB Code:
OLE2.close
set OLE2 = nothing
?
Yes.
Re: do i need to need to clear(set to nothing) an OLE link
i guess if i dont close the OLE2 it will take up memory?