Good day all.
My problem is in the extract from my program below.
The procedure call "Call RearrangeCoordinates(RearrangeCoords(), ReturnCoords())" return a message "Type mismatched: Array or user-defined type expected"
Are there any views as to why the message is being displayed?
Private Sub CommandButton1_Click()
Dim ReturnCoords As Variant
Dim ...........................................
ArrayLength = UBound(ReturnCoords)
ReDim RearrangeCoords(0 To ArrayLength) As Variant
Call RearrangeCoordinates(RearrangeCoords(), ReturnCoords())
..........................................
End Sub
Public Sub RearrangeCoordinates(ByRef RearCoord() As Variant, ByRef ReturnCoords() As Variant)
For q = 0 To 8 Step 2
RearrangeCoords(q) = ReturnCoords(q + 1)
RearrangeCoords(q + 1) = ReturnCoords(q)
Next q
End Sub
My problem is in the extract from my program below.
The procedure call "Call RearrangeCoordinates(RearrangeCoords(), ReturnCoords())" return a message "Type mismatched: Array or user-defined type expected"
Are there any views as to why the message is being displayed?
Private Sub CommandButton1_Click()
Dim ReturnCoords As Variant
Dim ...........................................
ArrayLength = UBound(ReturnCoords)
ReDim RearrangeCoords(0 To ArrayLength) As Variant
Call RearrangeCoordinates(RearrangeCoords(), ReturnCoords())
..........................................
End Sub
Public Sub RearrangeCoordinates(ByRef RearCoord() As Variant, ByRef ReturnCoords() As Variant)
For q = 0 To 8 Step 2
RearrangeCoords(q) = ReturnCoords(q + 1)
RearrangeCoords(q + 1) = ReturnCoords(q)
Next q
End Sub