|
-
Aug 19th, 2005, 05:52 AM
#1
Thread Starter
Frenzied Member
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?
-
Aug 19th, 2005, 05:54 AM
#2
Re: do i need to need to clear(set to nothing) an OLE link
-
Aug 19th, 2005, 05:55 AM
#3
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.
-
Aug 19th, 2005, 06:01 AM
#4
Frenzied Member
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.
-
Aug 19th, 2005, 06:17 AM
#5
Thread Starter
Frenzied Member
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?
-
Aug 19th, 2005, 06:19 AM
#6
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
-
Sep 1st, 2005, 12:59 PM
#7
Thread Starter
Frenzied Member
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
?
-
Sep 1st, 2005, 01:01 PM
#8
Re: do i need to need to clear(set to nothing) an OLE link
 Originally Posted by vb_student
you mean to say i should do the following
VB Code:
OLE2.close
set OLE2 = nothing
?
Yes.
-
Sep 2nd, 2005, 06:24 PM
#9
Thread Starter
Frenzied Member
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|