+ Reply to Thread
Results 1 to 5 of 5

Sort using CustomList - error

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    2003
    Posts
    17

    Sort using CustomList - error

    I need to sort a list using custom sort order
    I have created CustomList with
    Please Login or Register  to view this content.
    After that I add common Sort function:
    Please Login or Register  to view this content.
    but my code crushes on .SortFields.Add line with Run-time error '448': Named argument not found. I tried to google on this error, but without any result
    What am I writing wrong in .SortFields.Add arguments?

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Sort using CustomList - error

    Hi,

    You should use this as a workaround :

    Please Login or Register  to view this content.
    This is a bug confirmed by microsoft, read it here :
    http://support2.microsoft.com/default.aspx?kbid=134913

    Similiar problem :
    On google groups

    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Registered User
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    2003
    Posts
    17

    Re: Sort using CustomList - error

    karedog, thanks for your reply!

    I have already tried adding +1. Actually, initially my code was with that "+1" (copied from some forum as is) and afterwards I deleted it.
    Moreover, that bug was present only till Office 2000 according to Microsoft site, while I have Ofiice 2010.

    Anyway, this thing was not the case...
    My sorting was written like
    Please Login or Register  to view this content.
    meanwhile on many forums I saw sorting, written in 1 line:
    Please Login or Register  to view this content.
    After changing my sorting from "With Range() ... " to 1-line code, everything worked!

    However, still do not know, what the differences are

    Thanks again!
    Last edited by Shurov; 12-12-2014 at 04:46 AM.

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Sort using CustomList - error

    Dear Shurov, many thanks for the reputation point.

    The one line code sort is a range method, while the above multiline sort is an object of a worksheet.

    Now since you mention it, I just recalled it :
    One difference between them is, for the range method, the parameter name is OrderCustom, while for the sheet object it is CustomOrder
    So it is a typo. Yes, it is confusing why Microsoft doing something like this.

    So, if you willing to try the first code, try to change the parameter to CustomOrder since this is the parameter for the worksheet sort object.

    Regards

  5. #5
    Registered User
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    2003
    Posts
    17

    Re: Sort using CustomList - error

    Dear karedog, thanks for such exhaustive explanation!
    After changing words order in "OrderCustom" in multi-line sorting function it worked
    However, I have left 1-line function in my code

    Thanks again!

+ 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. [SOLVED] Sort Macro Run-time error '1004': Application/Object-defined error.
    By sam1212 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2014, 10:05 AM
  2. [SOLVED] [SOLVED]VBA Sort Error-runtime error 2147417848(80010108)
    By sureshtrb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2014, 12:59 PM
  3. Sort error
    By Alodar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2012, 09:49 PM
  4. sort error
    By dlh in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-11-2008, 05:42 PM
  5. Sort Error
    By griz in forum Excel General
    Replies: 5
    Last Post: 03-03-2008, 09:18 PM

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