+ Reply to Thread
Results 1 to 7 of 7

Excel crashes after I run a macro and then try to save the file

  1. #1
    Forum Contributor
    Join Date
    03-18-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    139

    Excel crashes after I run a macro and then try to save the file

    Hey guys,

    I combined two macros I found into one. First is to copy rows, second is to custom sort on the first column. Macro runs fine, but when I try to save the file, Excel crashes. Any idea why the macro is causing this crash? Here is the macro:

    Please Login or Register  to view this content.
    Any help would be greatly appreciated
    Last edited by dreddster; 09-23-2013 at 11:04 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Excel crashes after I run a macro and then try to save the file

    In your code there is a for loop without next, attach please a sample file for testing
    If solved remember to mark Thread as solved

  3. #3
    Forum Contributor
    Join Date
    03-18-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Excel crashes after I run a macro and then try to save the file

    Thank you, Patel.

    I have attached the file.test.xlsm

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Excel crashes after I run a macro and then try to save the file

    Your code causes crash also to me, but I don't understand why

  5. #5
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Excel crashes after I run a macro and then try to save the file

    Hi Dredster
    This solves the crashing problem + it copies & pastes to sheet 2. Not sure what the sort is supposed to do, but nothing happens
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    03-18-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Excel crashes after I run a macro and then try to save the file

    Hey Philb1, I have been fighting with this macro for over a week. Your solution is perfect!

    Thank you so much!

  7. #7
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Excel crashes after I run a macro and then try to save the file

    You're welcome

+ 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. Excel Crashes during automated macro to FTP a file
    By Packerbacker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2013, 08:12 AM
  2. Excel crashes when trying to save one particular xlsm only after running macro
    By duncandhu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2013, 11:10 AM
  3. [SOLVED] Excel Crashes when trying to save after running a sort macro
    By jed38 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-09-2013, 09:23 AM
  4. Excel 2011 Macro Crashes after Saving File
    By tpeters74 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2013, 03:41 AM
  5. Network Macro Crashes (cannot Save 'read-only' File)
    By Chuckles123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-11-2006, 11:52 PM

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