Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL: GetCustomListNum Returns Unexpected List Number


View products that this article applies to.

This article was previously published under Q134913

↑ Back to the top


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.

↑ Back to the top


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
				

↑ Back to the top


Status

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

↑ Back to the top


References

For more information about the GetCustomListNum method, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type GetCustomListNum method in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

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

↑ Back to the top


Keywords: kbprogramming, kbprb, KB134913

↑ Back to the top

Article Info
Article ID : 134913
Revision : 7
Created on : 1/19/2007
Published on : 1/19/2007
Exists online : False
Views : 590