Bonjour le forum,
Voila, j'essai péniblement d'adapter une petite application, mais lorsque je clic sur le boutton 'supprimer' (dans un USF), je n'ai rien.
J'ai eu avant ça plusieurs messages d'erreur : il manque 'End If', ou pas de 'For sans Next'.
Je ne comprends plus rien
Ci joint le code attaché à ce boutton:
Private Sub supprimer_Click()
Dim Item As Byte
Dim Response As Byte
Col = '129;00;00;00'
For Item = 0 To Listlio.ListCount
If Listlio.ListCount = 0 Then
MsgBox 'Veuillez sélectionner une personne dans la liste', vbInformation: Exit Sub
If Listlio.Selected(Item) = True Then
Response = MsgBox('Les coordonnées de ' & vbCrLf & vbCrLf & _
'Nom : ' & vbTab & lionom & vbCrLf & vbCrLf & _
'Entreprise : ' & vbTab & lioentreprise & vbCrLf & vbCrLf & _
'Equipe : ' & vbTab & lioequipe & vbCrLf & vbCrLf & _
'Qualification : ' & vbTab & lioqualif & vbCrLf & vbCrLf & _
'Vont être définitivement Supprimées ? ', vbCritical + vbOKCancel, 'Attention' & ' SUPPRESSION de : ' & lionom)
If Response = 1 Then
With Worksheets('fiche')
.Rows(Listlio.ListIndex + 2).Delete
End With
misajour Col
MsgBox 'Opération accomplie', vbInformation
Listlio.ListIndex = -1
Me.lionom = ''
Me.lioentreprise = ''
Me.lioequipe = ''
Me.lioqualif = ''
Else: MsgBox 'Opération annulée', vbInformation
End If
End If
End If
Next
End Sub
Merci pour votre aide.
Voila, j'essai péniblement d'adapter une petite application, mais lorsque je clic sur le boutton 'supprimer' (dans un USF), je n'ai rien.
J'ai eu avant ça plusieurs messages d'erreur : il manque 'End If', ou pas de 'For sans Next'.
Je ne comprends plus rien
Ci joint le code attaché à ce boutton:
Private Sub supprimer_Click()
Dim Item As Byte
Dim Response As Byte
Col = '129;00;00;00'
For Item = 0 To Listlio.ListCount
If Listlio.ListCount = 0 Then
MsgBox 'Veuillez sélectionner une personne dans la liste', vbInformation: Exit Sub
If Listlio.Selected(Item) = True Then
Response = MsgBox('Les coordonnées de ' & vbCrLf & vbCrLf & _
'Nom : ' & vbTab & lionom & vbCrLf & vbCrLf & _
'Entreprise : ' & vbTab & lioentreprise & vbCrLf & vbCrLf & _
'Equipe : ' & vbTab & lioequipe & vbCrLf & vbCrLf & _
'Qualification : ' & vbTab & lioqualif & vbCrLf & vbCrLf & _
'Vont être définitivement Supprimées ? ', vbCritical + vbOKCancel, 'Attention' & ' SUPPRESSION de : ' & lionom)
If Response = 1 Then
With Worksheets('fiche')
.Rows(Listlio.ListIndex + 2).Delete
End With
misajour Col
MsgBox 'Opération accomplie', vbInformation
Listlio.ListIndex = -1
Me.lionom = ''
Me.lioentreprise = ''
Me.lioequipe = ''
Me.lioqualif = ''
Else: MsgBox 'Opération annulée', vbInformation
End If
End If
End If
Next
End Sub
Merci pour votre aide.