Function Array Conversions Class

VariantVectorToStringVector

Convert a Variant vector into a String vector. Copies each of the elements of a one-dimensional Variant array into a one-dimensional array of String values.

Signature (Visual Basic / VBA)

Public Function VariantVectorToStringVector( _
      ByRef rTo() As String _
    , ByRef vFm() As Variant _
    ) As Boolean

Code Example

    Assuming
       Static avarNames(0 To 2) As Variant
       avarNames(1) = "Car"
       Dim astrNames() As String
    for example
       VariantVectorToStringVector(astrNames(), avarNames()) = True
    leaves
       LBound(astrNames) = 0
       UBound(astrNames) = 2
       astrNames(0) = ""
       astrNames(1) = "Car"
       astrNames(2) = ""

Parameters

Parameter Description
rTo Dynamic array of Strings that will be dimensioned with one dimension before it receives copy of each of the elements in vFm.
vFm One-dimensional array of Variant values that will be copied to array rTo.

Return Value

Function currently always returns True.