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
| Dim iCompt As Long, Tablo() As Variant, DimTablo As Long
Public Function fctPlus(NomChamp As Variant, iCombien As Long) As Long
If DimTablo > 0 Then
For i = 1 To DimTablo
If Tablo(2, i) = NomChamp Then fctPlus = Tablo(1, i): Exit Function
Next i
End If
DimTablo = DimTablo + 1
ReDim Preserve Tablo(2, DimTablo)
Tablo(2, DimTablo) = NomChamp
iCompt = iCompt + 1
Tablo(1, DimTablo) = iCompt
fctPlus = iCompt
End Function
Public Sub subZéro(iCombien As Long)
iCompt = iCombien
DimTablo = 0
End Sub |
Partager