XL: GetCustomListNum Returns Unexpected List Number

ID: Q134913


The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel 97 for Windows
  • Microsoft Excel 98 Macintosh Edition


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 this to be a problem in the Microsoft products listed at the beginning of this article.


REFERENCES

"Excel Visual Basic for Applications Reference," version 5.0, page 289, by Microsoft Press

For more information about GetCustomListNum, choose Help, Contents, Programming in Visual Basic, click the Search button and type:

GetCustomListNum

Additional query words: 5.00a 5.00c 7.00a XL98 XL97 XL7 XL5

Keywords : kbprg kbdta PgmOthr KbVBA
Version : MACINTOSH:5.0,5.0a,98; WINDOWS:5.0,5.0c,7.0,7.0a,97; winnt:5.0
Platform : MACINTOSH WINDOWS winnt
Issue type : kbprb


Last Reviewed: October 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.