+ Reply to Thread
Results 1 to 4 of 4

Convert Sort code for Excel 2003

  1. #1
    Registered User
    Join Date
    06-28-2011
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010, 2013, 2016, 365
    Posts
    79

    Exclamation Convert Sort code for Excel 2003

    Hi All, I have the following macro working in Excel 2007 but it appears not to be compatible with 2003:

    Please Login or Register  to view this content.
    It's the <ws.Sort.SortFields.Clear> function that appears to be the problem. Can anyone help me to code this so that it's compatible with 2003?

    Many thanks,
    AdLoki
    Last edited by AdLoki; 07-07-2011 at 08:26 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Convert Sort code for Excel 2003

    Sorry I can't look at your code at the moment.

    However this example code might give you a start
    Please Login or Register  to view this content.

    You don't need to use the if statement, 2007 will handle the 2003 code.

    Hope this is of some help.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    06-28-2011
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010, 2013, 2016, 365
    Posts
    79

    Re: Convert Sort code for Excel 2003

    Hi Marcol,

    Thanks, this is the line I was already pursuing when you posted your response. Unfortunately, the following code is still kicking out errors

    Please Login or Register  to view this content.
    I'm now getting a 1004 error (Method 'Range' of object '_Worksheet' failed). Debugger highlights the underlined code above.

    I also still haven't figured out how to replicate the <With rge_Sort.Sort> and <rge_Sort.Sort.Clear> functions. Having looked around, I gather it is something to do with 2007 sorting objects which is not back-compatible functionality but, because I'm a n00b, I don't really understand how to resolve this...

    Any help is appreciated.

    Cheers,
    AdLoki
    Last edited by AdLoki; 07-06-2011 at 09:22 AM. Reason: Correction to code

  4. #4
    Registered User
    Join Date
    06-28-2011
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010, 2013, 2016, 365
    Posts
    79

    Re: Convert Sort code for Excel 2003

    Marked as solved, thanks to romperstomper here.

    Final code below for completeness.

    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