|
-
Feb 4th, 2008, 06:38 AM
#1
Thread Starter
Member
[RESOLVED] Release resources of excel
In vb6 application i have imported data from excel sheet by creating excel application. After the application excel resources are not released and it is not opening even after following code i have used at the end of the application.
Set xl = Nothing
Set xlwbook = Nothing
Set xlSheet = Nothing
-
Feb 4th, 2008, 06:42 AM
#2
Re: Release resources of excel
before setting to nothing, you must close your workbook and quit your application
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Feb 4th, 2008, 06:55 AM
#3
Thread Starter
Member
Re: Release resources of excel
it is working,but is it enough only xlwbook is closed or any other should be closed.Anyway thanks for helping.
-
Feb 4th, 2008, 11:47 PM
#4
Frenzied Member
Re: Release resources of excel
There is a tutorial by si_the_geek as to how to open and close, release memory. See my signature.
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
|