+ Reply to Thread
Results 1 to 4 of 4

Code Crashes Excel 2010 but works in Excel 2003

  1. #1
    Registered User
    Join Date
    10-23-2009
    Location
    DC, USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Exclamation Code Crashes Excel 2010 but works in Excel 2003

    Hello,

    I have the following code that is crashing Excel 2010. It is applied to a range of cells that contain a column header. When the cell is double clicked it is suppose to sort by that column. Unfortunately, Excel crashes instead. This code works fine in 2003. Any suggestions would be appreciated.

    Thanks!

    Update: It's only the last sort criteria that crashes Excel. When removed, the macro runs fine and Excel does not crash but with it, Excel crashes. It looks like it runs as all the way through, sorts, and then crashes.

    Please Login or Register  to view this content.
    Last edited by aaronf316; 05-18-2011 at 12:24 PM.

  2. #2
    Registered User
    Join Date
    01-04-2011
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Code Crashes Excel 2010 but works in Excel 2003

    The last sort only uses one Key.
    Have you tried adding a Key 2 so it looks more similar to the sorts that are working?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Code Crashes Excel 2010 but works in Excel 2003

    You haven't specified Order3 in any of the cases; you specify Order2 twice. Try this.
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Code Crashes Excel 2010 but works in Excel 2003

    probably this suffices:

    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)

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