<-- Previous || Up || Next -->

Set Variant Vector Function
Array Manipulations Class

Public Function SetVariantVector( _
      ByRef rIn() As Variant _
    , ByVal v1Dim As Variant _
    , ByVal vValue As Variant _
    ) As Boolean

"Set Variant Vector Element"
Sets the value of an element of a one-dimensional Variant array.
Will expand the array if necessary to allow the element to be set.

Summary:
    rIn(v1Dim) = vValue
Example:
    Assuming
       Dim avarData() As Variant
       ReDim avarData(0 To 5)
    for example
       SetVariantVector(10, "RE") = True
See also:
    SetVariantMatrix Function
    SetVariantCube Function
    ReDimPreserveVariantVector Function
rIn: One-dimensional array of Variant values. rIn must already be dimensioned before it is passed to this function or else an error will occur. rIn should be dynamic because this function will attempt to redimension the array if necessary so that the specified element can be set.
v1Dim: Number of the element whose value will be set to vValue. Function returns False if v1Dim is Null or cannot be fixed-up to a number.
vValue: The value that will be assigned to element rIn(v1Dim)
Return value: Function returns True upon success.

Return to ENTISOFT Home Page

Copyright 1999-2005 Entisoft