A possible solution is to define two classes and to refer to them. Class LineaCollection holding a collection of the class Linea. Thus, you may refer to them in a module like this:
Public Sub TestMe()
Dim lineasCMTS As New LineasCollection
lineasCMTS.From = 200
lineasCMTS.ToV = 219
lineasCMTS.AddValue RGB(0, 50, 100), "Cisco"
lineasCMTS.AddValue RGB(0, 50, 101), "Huawei"
Dim cnt As Long
For cnt = 1 To lineasCMTS.InfoCollection.Count
Debug.Print lineasCMTS.InfoCollection(cnt).Name
Debug.Print lineasCMTS.InfoCollection(cnt).Color
Next cnt
End Sub
The idea of these classes, is that Linea has the Name and the Color properties, including a factory design patter for creating itself:
Option Explicit
Private m_sName As String
Private m_lColor As Long
Public Property Get Name() As String
Name = m_sName
End Property
Public Property Get Color() As Long
Color = m_lColor
End Property
Public Property Let Color(ByVal lNewValue As Long)
m_lColor = lNewValue
End Property
Public Property Let Name(ByVal sNewValue As String)
m_sName = sNewValue
End Property
Public Sub CreateLinea(newObj As Linea, newColor As Long, newName As String)
newObj.Name = newName
newObj.Color = newColor
End Sub
The LineasCollection has the AddValue, AddToCollection methods, which communicate with the Linea class or with the module outside. From and To are properties and InfoCollection is the possibility to access the whole collection:
Option Explicit
Private m_lFrom As Long
Private m_lTov As Long
Private m_cLineasCollection As New Collection
Public Property Get InfoCollection() As Collection
Set InfoCollection = m_cLineasCollection
End Property
Public Property Get From() As Long
From = m_lFrom
End Property
Public Property Get ToV() As Long
ToV = m_lTov
End Property
Public Property Let ToV(ByVal lNewValue As Long)
m_lTov = lNewValue
End Property
Public Property Let From(ByVal lNewValue As Long)
m_lFrom = lNewValue
End Property
Public Sub AddToCollection(newObj As Linea)
m_cLineasCollection.Add newObj
End Sub
Public Sub AddValue(colorNew As Long, nameNew As String)
Dim newObj As New Linea
newObj.CreateLinea newObj, colorNew, nameNew
AddToCollection newObj
End Sub