PreviousActiveX Controls Guide (9.1 revision 1) Next

AddItem

Show this topic in Library frames

Applies to:

VACombo, VAList

Description

Adds an item to a VAList or VACombo control operating in field-bound mode.

Syntax

object.AddItem item, index 

The AddItem method syntax has these parts:

Part
Description
object
Required. An object expression that evaluates to an object in the Applies To list.
item
Required. String expression specifying the item to add to the object.
index
Optional. Integer specifying the position within the object where the new item is placed. For the first item in a VAList or VACombo control, index is 0.

Remarks

If you supply a valid value for index, item is placed at that position within the object. If index is omitted, item is added at the proper sorted position (if the Sorted property is set to True) or to the end of the list (if Sorted is set to False).

A VAList or VACombo control that is operating in record list mode (VARecordList property is set to True) does not support the AddItem method.

Example

Private Sub Command1_Click() 
VAList1.AddItem (Text2.Text) 
End Sub 

Chapter contents
Publication contents

Prev topic: AboutBox
Next topic: Btrv