Public Function StringSegmentsToVariantVector( _ ByRef rTo() As Variant _ , ByVal vFm As Variant _ , ByVal vSegmentLength As Variant _ ) As Boolean
Assuming Dim S As String S = "Ariz Calif Nev Ore Wash " Dim V() as Variant for example StringSegmentsToVariantVector(V(), S, 6) = True leaves LBound(V) = 0 UBound(V) = 5 V(0) = Empty V(1) = "Ariz " V(2) = "Calif " V(3) = "Nev " V(4) = "Ore " V(5) = "Wash "See also:
StringToVariantVector FunctionrTo: Dynamic array of Variants whose elements each receive one of the string segments. Array rTo is always reinitialized with a lower bound of 0 (zero) and an upper bound of the number of sub-string segments.
vFm: String containing the equal-length segments which are to be copied into the array. Function returns False if vFm is Null or cannot be fixed up to a String.
Note: Function will return True and leave rTo initialized from 0 to 0 if vFm is an empty string.
vSegmentLength: The length of each sub-string segment within string vFm. Function returns False if vSegmentLength is Null or cannot be fixed up to a number.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.