Microsoft KB Archive/134913

= XL: GetCustomListNum Returns Unexpected List Number =

Article ID: 134913

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition
 * Microsoft Excel 2002 Standard Edition
 * Microsoft Excel 97 Standard Edition
 * Microsoft Excel 95 Standard Edition
 * Microsoft Excel 95a
 * Microsoft Excel 5.0 Standard Edition
 * Microsoft Excel 5.0c
 * Microsoft Excel 5.0 Standard Edition
 * Microsoft Excel 98 for Macintosh
 * Microsoft Excel 5.0 for Macintosh
 * Microsoft Excel 5.0a for Macintosh

-



This article was previously published under Q134913



SYMPTOMS
The GetCustomListNum method returns a number that is one less than the expected number when you use it to evaluate an array containing a custom list. When you use the number returned by the GetCustomListNum method as the OrderCustom argument for the Sort method, Microsoft Excel will still sort values using the default sort order and not the custom sort order as expected.



WORKAROUND
To work around this problem, add one to the number returned by the GetCustomListNum method for use within a procedure, as in the following example: Application.GetCustomListNum + 1



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

