Chapter 2 -- 85
Reference Guide
"
"
"
"
Barcodes.Add
VTS_DISPATCH or Barcode
Add
(
strBarcodeName
).
Adds a new Barcode object to the collection.
Return value
: Returns a Barcode object.
Parameters:
strBarcodeName
Optional VT_BSTR or String. The
name of the object to add.
"
"
"
"
Barcodes.Item
VTS_DISPATCH or Barcode
Item
(
varIndex
).
Returns a member of a collection, either by position or by name.
Note
If the value provided as Index does not match any existing
member of the collection, no object is returned.
Parameters:
varIndex
Required VT_VARIANT or Variant. The name or
index number of a member of the collection.
The index can be a numeric expression (a number from 1 to the
value of the collection’s Count property), a constant, or a string.
Note
If the value provided as Index doesn’t match any existing
member of the collection, an error occurs.
The Item method is the default method for collections. The
following two lines of code are equivalent.
Object. Barcodes (1)
Object. Barcodes.Item(1)
"
"
"
"
Barcodes.Remove
VTS_NONE
Remove
(
varIndex
).
Removes a member from the collection.
Parameters
:
varIndex
Required VT_VARIANT or Variant. An expression
that specifies the position of a member of the collection. If a
numeric expression, index must be a number from 1 to the value
of the collection’s Count property. If a string expression, index
must correspond to the key argument specified when the
member referred to was added to the collection.
Object
Methods