Signature (Visual Basic / VBA)
Public Function SetVariantMatrix( _
ByRef rIn() As Variant _
, ByVal v1Dim As Variant _
, ByVal v2Dim As Variant _
, ByVal vValue As Variant _
) As Boolean
Code Examples
Assuming
Dim avarData() As Variant
ReDim avarData(0 To 5, 0 To 5)
for example
SetVariantMatrix(10, 5, "RE") = True
rIn(v1Dim, v2Dim) = vValue
Parameters
| Parameter | Description |
|---|---|
| rIn | Two-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. |
| vValue | The value that will be assigned to element rIn(v1Dim, v2Dim) |
Return Value
Function returns True upon success.
Notes & Version History
| v1Dim | First-dimension element number of the element to be set. Function returns False if v1Dim is Null or cannot be fixed-up to a number. |
| v2Dim | Second-dimension element number of the element to be set. Function returns False if v2Dim is Null or cannot be fixed-up to a number. |