Private Sub Ajouter_Click()
'transfert de la Liste des onglets -> Liste des onglets conservées
Dim g, gmax, n, m, h As Variant
gmax = ListBox1.ListCount - 1
For g = 0 To gmax
If ListBox1.Selected(g) = True Then
ListBox2.AddItem ListBox1.List(g, 0)
m = ListBox2.ListCount - 1
ListBox1.RemoveItem (g)
g = g - 1
End If
'pb de sortie de boucle for en fin de liste
gmax = ListBox1.ListCount - 1
If g = gmax Then Exit For
Next g
End Sub
------------------------------------------------
Private Sub Supprimer_Click()
'transfert de la Liste des onglets conservées -> Liste des onglets
Dim g, gmax, n, m As Variant
gmax = ListBox2.ListCount
For g = 0 To gmax
If ListBox2.Selected(g) = True Then
ListBox1.AddItem ListBox2.List(g, 0)
ListBox2.RemoveItem (g)
g = g - 1
End If
'pb de sortie de boucle for en fin de liste
gmax = ListBox2.ListCount
If g = gmax - 1 Then Exit For
Next g
End Sub