+ Reply to Thread
Results 1 to 2 of 2

Excel 97 Memory Leak

Hybrid View

  1. #1
    Registered User
    Join Date
    09-05-2007
    Posts
    1

    Excel 97 Memory Leak

    I've created a Sudoku solver using VBA in Excel 97. Although the solver normally works okay it periodically seems to malfunction. Fix is always to exit Excel completely and then re-open the spreadsheet. Largest global by far is Private boolArrCellValues(1 To 16, 1 To 16, 1 To 16) As Boolean, so I don't think I'm taxing memory storage.

    I am definitely explicitly initializing all globals when macro starts. However, I get different results on the same puzzle, so it can't be a coding error (else the malfunction would always yield the same wrong results). Apparently, Excel 97 is susceptible to some sort of memory leak.

    Is there a way of protecting my global variables and protecting the system memory allocated to Excel to prevent corruption? I'm running Win XP, on a P4 (3 GHz) with 1 gb memory. Application has 8 separate command buttons, each invoking their own code against the shared global variables. There is only about 1000 lines of code involved, so it doesn't seem as if the system should be overloaded.

    I use boolArrCellValues(row, column, candidate) to maintain candidates for each cell, and only write to a cell when there is any change to one of its 16 booleans. Processing seems clean so I can't think of a way to streamline.

    Application seems made to order for Excel, but I need to diagnose/resolve recurring memory corruption. Is this a known problem in Excel 97? Will upgrading to Excel 2003 make the problem disappear. If I have to migrate to VB6 (which I have a copy of) is there a free VB6 component that will facilitate a spreadsheet type of Sudoku presentation?

  2. #2
    Forum Contributor
    Join Date
    12-12-2006
    Location
    New Zealand
    Posts
    151
    This is a Cross Post

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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