Microsoft KB Archive/124928

= Microsoft Knowledge Base =

XL: Blank Items Not Added Automatically with AddItem Method
Last reviewed: May 30, 1997

Article ID: Q124928

The information in this article applies to:


 * Microsoft Excel for Windows, version 5.0, 5.0c
 * Microsoft Excel for Macintosh, versions 5.0, 5.0a
 * Microsoft Excel for Windows 95, versions 7.0, 7.0a
 * Microsoft Excel 97 for Windows

SUMMARY
In Microsoft Excel, the Visual Basic for Applications help file contains a documentation error in the topic for the AddItem method for drawing objects, list boxes, and drop down boxes.

The AddItem help topic indicates that the Index argument for the AddItem method for drawing objects, list boxes, and drop down boxes will specify the position at which to add the new entry. The help file incorrectly documents that if the list has fewer entries than the specified index, blank items are added from the end of the list to the specified position. If you attempt the AddItem method with an Index that exceeds the count of the items in the list or drop down box, the item will always be added to the end of the list (blank items are not added).

MORE INFORMATION
To locate the help topic containing the error in Microsoft Excel 5.0:


 * 1) On the Help menu, click Contents.
 * 2) Select the Programming with Visual Basic topic.
 * 3) Click the Search button and type "AddItem" (without the quotation marks).
 * 4) Click the Show Topics button, select AddItem Method, and then click GoTo.