+ Reply to Thread
Results 1 to 4 of 4

Tables Causing Crashes

  1. #1
    Registered User
    Join Date
    09-25-2008
    Location
    Winnetka, CA
    Posts
    83

    Tables Causing Crashes

    My data is in a table (ListObject) of 46 columns and about 6000 rows. My macros mostly add data to certain cells.

    Starting yesterday, the macros would stop running at random points. Eventually I realized that whenever a cell is selected or its value changed, there's a small chance that the macro will quit with no error message.

    To test this, I ran this simple macro to select every cell in a column and highlight it:

    Please Login or Register  to view this content.
    Each time I ran it, it would highlight more cells -- the first time around 30, the next time around 70, etc. -- but it always stopped long before 6000. The results were never consistent.

    I tried copying all the data into a new workbook, and that worked for a while. (I meant to copy it as a range, not a table, but I frankly don't remember.)

    When I convert the table to a range, this problem doesn't happen, but it returns when I change it back. It also happens to another table of similar size which is derived from the main one.

    Converting the data to a range, and changing the macros accordingly, would be a very big job and I have reports to get finished before I can tackle it. I had eventually planned to use the method of importing the whole table into an array, and processing it there, but that's a big job too.

    Any idea what could be causing the corruption? And more to the point, how to get the macros to keep running?

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Tables Causing Crashes

    your method of testing for an error isn't the best
    from what you are explaining....the code is finishing but not all of it is executing as you expecting

    Please Login or Register  to view this content.
    try this and see what the outcome of the debug
    (Press CTRL + G after the code has run once, "immediate" will pop up and show all the outputs)

    does it go all the way thru and list all the cells in the range?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    09-25-2008
    Location
    Winnetka, CA
    Posts
    83

    Re: Tables Causing Crashes

    Quote Originally Posted by humdingaling View Post

    try this and see what the outcome of the debug
    ...

    does it go all the way thru and list all the cells in the range?

    When I tried your test, yes, it went all the way through.

    When I added the "Debug.print" line to my own test macro, it stops as before after a few dozen lines. The Immediate window shows the address of the cell where execution stopped.

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Tables Causing Crashes

    by your macro you mean the select one?
    try make it direct instead of select
    does it go thru to completion?

    Please Login or Register  to view this content.

+ 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. PMT Causing Confusion
    By timbo1957 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-07-2015, 03:54 PM
  2. What's causing this Overlap?
    By tewald82 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-15-2014, 12:12 PM
  3. Replies: 5
    Last Post: 04-11-2014, 02:17 PM
  4. Replies: 3
    Last Post: 07-13-2012, 09:48 AM
  5. Excel 2007 crashes when calculating PIVOT tables
    By tluria in forum Excel General
    Replies: 0
    Last Post: 01-24-2011, 12:51 PM
  6. cannot find what is causing the bug
    By unley in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-13-2009, 06:35 PM
  7. #N/A causing probs
    By Talbot in forum Excel General
    Replies: 1
    Last Post: 07-10-2007, 12:14 PM

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