|
Public Function ReDimPreserveVariantVector( _
ByRef rVector() As Variant _
, Optional ByVal vLBound1 As Variant _
, Optional ByVal vUBound1 As Variant _
) As Boolean Assuming
Dim avarNums() As Variant
ReDim avarNums(0 To 5)
avarNums(1) = .45
avarNums(2) = .12
' ....
for example
' Same as ReDim Preserve avarNums(-5 To 5)
' if Visual Basic would allow it.
ReDimPreserveVariantVector(avarNums(), -5) = True
leaves
avarNums(1) = .45
avarNums(2) = .12
' Etc.See also: ReDimPreserveVariantCube Function
ReDimPreserveVariantMatrix Function
BasicExtensions Class
ReDim Preserve Statement (Visual Basic)rVector: Dynamic, one-dimensional array of Variant values that will be redimensioned. rVector must already be dimensioned before it is passed to this function or else an error will occur. Copyright © 1999-2005 Entisoft