Results 1 to 4 of 4

Thread: [RESOLVED] Release resources of excel

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2007
    Posts
    38

    Resolved [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

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    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

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2007
    Posts
    38

    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.

  4. #4
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    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
  •  



Click Here to Expand Forum to Full Width