+ Reply to Thread
Results 1 to 2 of 2

VBA Macro Causing Excel To Crash - Can it Be More Efficient?

  1. #1
    Registered User
    Join Date
    05-09-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    1

    VBA Macro Causing Excel To Crash - Can it Be More Efficient?

    Hello,

    I have a macro that if it is run several times within the tool, will cause excel to crash. The purpose of the code is to filter a sheet (Sheet8) by certain values then paste 5 of the rows into a new sheet (Sheet10) then take out any duplicates from the individual columns, sort column B in ascending order then put the result as the ListFillRange for 5 MS.Forms Boxes on a third sheet (sheet9). Any ideas why this might be crashing excel? Are there efficiencies that could be added?

    Thanks!
    Sarah

    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: VBA Macro Causing Excel To Crash - Can it Be More Efficient?

    Hi Sarah and welcome to the forum,

    I'd set a breakpoint in the code and single step through it. You need to look at each step to insure it is doing what you are expecting. If it works correctly then you either have a timing problem when you should insert some "DoEvents" in the code or you aren't releasing enough memory to continue.

    Read:
    http://www.cpearson.com/Excel/DebuggingVBA.aspx

    If that doesn't help at all then you need to post the workbook and we can look at it.

    Another possibility is that the code is trying to work outside its scope. See:
    http://www.cpearson.com/Excel/Scope.aspx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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