The following code is giving me an "Invalid procedure call or argument" error. The code is a class object "aCanopy" that contains a collection of "Members". Each member class also contains a collections of "Triangles". I can address the properties of the Members just fine but the error occurs whenever I try to access a Triangle in the Triangles collection.
The following is the Get statement in the Triangles class:
Any help would be greatly appreciated.
Thank you
Code:
Sub jUpdate()
Dim i As Long
Dim j As Long
Dim k As Long
Dim ws3 As Worksheet
Dim Row As Range
Dim m As Member
Dim t As Triangle
Dim s As Triangles
Dim p As Nodes
Set ws3 = Sheets("3D Data")
If Not ws3.Cells(20, 3).Value Then Exit Sub
k = aCanopy.Members.Item(1).Triangles.Count
Set s = aCanopy.Members.Item(1).Triangles
For i = 1 To k
Set t = s.Item(i)
Call aTri(i, t.UnitNormalVector.z, t.p1.x, t.p1.y, t.p2.x, t.p2.y, t.p3.x, t.p3.y, 100, 100, 100)
Next i
End Sub
The following is the Get statement in the Triangles class:
Code:
Public Property Get Item(ByVal Value As String) As Triangle
Set Item = cTriangles(Value)
End Property
Any help would be greatly appreciated.
Thank you