+ Reply to Thread
Results 1 to 4 of 4

Excel Crashes when trying to save after running a sort macro

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    163

    Excel Crashes when trying to save after running a sort macro

    I have attached the workbook. there are 5 sheets. all the sheets have text boxes that when clicked run a macro. the textbox labeled Sort runs the CustomSort macro. when i run the sort macro in sheet 2 named Blank with part (2 Columns) it saves fine.

    But if i run that same macro on sheet 4 named Blank With Part (4 Columns) it will run the sort macro but after that i try to save it and it crashes. it does not crash when i run any of the other macros so i have narrowed it down to the customsort macro.

    I just dont understand why it would work on one sheet and then not the other.

    this is driving me crazyyyy

    any help would be awesome

    i have already tried clearing my temp files and that did not help


    thanks
    JD
    Last edited by jed38; 07-09-2013 at 09:39 AM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel Crashes when trying to save after running a sort macro

    change the antepenultimate line of your code to refer to sheet instead of 'Blank with part (2 columns)' when clearing the sort fields
    sheet.Sort.SortFields.Clear
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor
    Join Date
    08-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Excel Crashes when trying to save after running a sort macro

    your a life saver

    i dont know how I missed that

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Excel Crashes when trying to save after running a sort macro

    I was working on sort code and saved the book on my PC. When I tried to re-open, it had crashed excel 3 times. I have now deleted that book.

+ 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