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 26 27 28 29 30
| Private Sub Bt_Retry_Click()
'
' Fonction de suppression des privileges
'
Dim reponse As Integer
'
' Me.Zl_Affected.ListIndex retourne -1 si aucune sélection dans la boite liste
' http://office.microsoft.com/fr-fr/access-help/listindex-propriete-HA001232756.aspx
'
If Me.LB_Affecte.ListIndex = -1 Then
reponse = MsgBox("Vous devez sélectionner des lignes", vbInformation + vbOKOnly, "Erreur Sélection")
Exit Sub
End If
'
If Me.LB_Affecte.ListIndex >= 0 Then
For i = 0 To Me.LB_Affecte.ListCount - 1
If Me.LB_Affecte.Selected(i) Then ' verifie si la ligne a été sélectionnée
'
' Recupere l'id Logiciel
'
Me.LB_Affecte.Selected(i) = False
'
reponse = Delete_Logiciels(Me.LB_Affecte.Column(0, i), Me.idposte)
End If
Next i
'
Call LB_Refresh ' rafraichir les 2 listes
End If
End Sub |
Partager