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 Sub OK_Click()
Call init
Dim memoire As Integer
memoire = List.ListIndex
Dim i As Integer
For i = 0 To nb_operation
If debut_tableau.Offset(i, 1).Interior.ColorIndex = 50 Then
List.ListIndex = List.ListIndex + 1
End If
Next i
Range(debut_tableau.Offset(List.ListIndex, 0), debut_tableau.Offset(List.ListIndex, 3)).Interior.ColorIndex = 50
List.RemoveItem (memoire)
List.ListIndex = 0
End Sub
Private Sub UserForm_Activate()
Call init
Dim cellule As Range
List.Clear
For Each cellule In Range(debut_tableau.Offset(0, 1), debut_tableau.Offset(nb_operation, 1))
If cellule.Interior.ColorIndex = 15 Then
List.AddItem (cellule.Offset(0, -1).Value & " " & cellule.Value)
End If
Next cellule
End Sub |
Partager