Signature (Visual Basic / VBA)
Public Function OverlayVariantVector( _
ByRef rTo() As Variant _
, ByRef vFm() As Variant _
, Optional ByVal vOffset As Variant _
) As Boolean
Code Example
Assuming
Static avarIn(0 To 5) As Variant
avarIn(1, 1) = "Smith"
Static avarOut(1 To 6) As Variant
for example
OverlayVariantMatrix(avarOut(), avarIn(), 1) = True
Parameters
| Parameter | Description |
|---|---|
| rTo | One-dimensional array of Variant values that will be overlaid with vFm. rTo must already be dimensioned before it is passed to this function or else an error will occur. |
| vFm | The one-dimensional array of Variants that will be overlaid onto rTo. vFm can be either Static or dynamic. If vFm is dynamic, it must be dimensioned before being passed to this function. |
| vOffset | Offset for the bounds and elements within the new array. vOffset defaults to 0 (zero) if it is missing or Null or cannot be fixed-up to a number. |
Return Value
Function currently returns True in all cases.
Notes & Version History
| Note | Function silently ignores cases where an element is to be copied to a location outside the bounds of the destination array. |
| Note | rTo and vFm can be the same arrays. |
| v1.2 Change | Changed argument vOffset to be Optional. |