[B][COLOR=Blue]Private Sub Valider_Click()[/COLOR][/B]
Dim x As Long
On Error Resume Next
x = CLng(ListBox1.List(ListBox1.ListIndex, 1))
If x < 2 Then
MsgBox "Merci de sélectionner une leçon !", vbInformation, "ATTENTION ..."
On Error GoTo 0
Exit Sub
End If
On Error GoTo 0
With Sheets("Création")
' Etc ....
[B][COLOR=Blue]Private Sub Valider_Click()[/COLOR][/B]
Dim x As Long
If ListBox1.ListIndex = -1 then
MsgBox "Merci de sélectionner une leçon !", vbInformation, "ATTENTION ..."
Exit Sub
End If
' Si OK
x = CLng(ListBox1.List(ListBox1.ListIndex, 1))
With Sheets("Création")
' Etc ....