1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Private Keys As String, Etalonnages As New CollectionPrivate ID_ As String, Marque_ As String, Modele_ As String
Private Function Existe(Key As String) As Boolean
'©
Existe = InStr(1, "©" & Keys & "©", "©" & Key & "©")
End Function
Public Sub Add(ID As String, Marque As String, Modele As String, Etalon As String, Coeficient1 As String, Coeficient2 As String, L As Integer)
ID_ = ID: Marque_ = Marque: Modele_ = Modele
If Not Existe(Format(Etalon, "yyyy-mm-dd")) Then
Etalonnages.Add New Etalonnage, Format(Etalon, "yyyy-mm-dd")
Keys = Keys & "©" & Format(Etalon, "yyyy-mm-dd") & "©"
End If
Etalonnages(Format(Etalon, "yyyy-mm-dd")).Add Format(Etalon, "yyyy-mm-dd"), Coeficient1, Coeficient2, L
L = L + 1
End Sub
Public Sub RetourneTableau(T() As String, R As Integer)
T(R, 0) = ID_ & "," & Marque_ & "," & Modele_
Dim Cls As Etalonnage
For Each Cls In Etalonnages
Cls.RetourneTableau T, R
Next
R = R + 1
End Sub
Private Sub Class_Initialize()
Set Etalonnages = Nothing
End Sub |
Partager