+ Reply to Thread
Results 1 to 11 of 11

Excel/VBA/ADO - Import - use up memory and won't release used memory after import

  1. #1
    Registered User
    Join Date
    09-29-2019
    Location
    Copenhagen
    MS-Off Ver
    Office 365
    Posts
    4

    Excel/VBA/ADO - Import - use up memory and won't release used memory after import

    Excel/VBA/ADO

    I am doing import to an Access database from records in an Excel file.
    During import I can see the use of memory is increasing (I have the windows joblist open).
    I have tried performing commit for every 1000 record (and then start new transaction). That didn't help.
    After import, and all connections and files are closed, Excel won't release used memory.
    Only when I close Excel, memory is released.

    Has anyone an input for this - e.g. how to release memory during the import.

    Best regards,
    Thomas

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel/VBA/ADO - Import - use up memory and won't release used memory after import

    Thomas

    How are you doing the import?
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow


    If it's not just a bad code not well managing variables objects as usual
    there is nothing to do as we can't modify the Excel memory behavior …

  4. #4
    Registered User
    Join Date
    09-29-2019
    Location
    Copenhagen
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Excel/VBA/ADO - Import - use up memory and won't release used memory after import

    I think I have used all the right things regarding object, variables, connections and so on.
    I there just was a way to release used memory.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel/VBA/ADO - Import - use up memory and won't release used memory after import

    Thomas

    Wait a minute, I'll have a quick look in my crystal ball and check if I can see your code.

    Oh no, it's really misty and I can't see anything.

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    (removed as duplicate …)
    Last edited by Marc L; 10-07-2019 at 05:15 AM.

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Quote Originally Posted by Thomas Gram View Post
    I there just was a way to release used memory.
    So with a good code just close Excel and sometimes the computer needs to be rebooted …

    As the obvious way is to process from Access and not from Excel …

  8. #8
    Registered User
    Join Date
    09-29-2019
    Location
    Copenhagen
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Excel/VBA/ADO - Import - use up memory and won't release used memory after import

    Hi Norie

    The code is confidential - so I can't post it here - sorry.

    I just want to know if someone has experienced the same thing and what they did to solve the problem

    BG, Thomas

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Yes I saw that, often it was a bad code.

    But as Excel is one of the worst software for memory management and far slower than Access …

  10. #10
    Registered User
    Join Date
    09-29-2019
    Location
    Copenhagen
    MS-Off Ver
    Office 365
    Posts
    4
    Thanks for input

    BG,
    Thomas

  11. #11
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: Excel/VBA/ADO - Import - use up memory and won't release used memory after import

    If you're running the code in Excel on an open workbook, then memory leaks are a known side effect.
    Rory

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Thrashing VBA Memory Leaks. Memory Loop Problems. Uncleared Memory in .Match Range Object
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2017, 05:17 PM
  2. VBA Macro text import memory error
    By whocares4 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2015, 06:22 PM
  3. Excel 2010 fails to release memory allocation
    By TACAMO in forum Excel General
    Replies: 3
    Last Post: 02-03-2014, 07:42 PM
  4. Import File Memory Leak
    By rbateman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 02:46 PM
  5. Excel won't release memory
    By jkmcn69 in forum Excel General
    Replies: 1
    Last Post: 02-16-2011, 03:51 AM
  6. Release Variable from Memory Problem
    By Huyeote in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2006, 12:43 AM
  7. how do i release memory
    By kurb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2005, 01:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1