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 31 32 33
| Private Sub CommandButtonValider_Click()
Dim Checkliste As ListItem
Dim i As Integer
Dim j As Integer
Application.ScreenUpdating = False
If TextBox1 = "" Then
Me.TextBox1.SetFocus
MsgBox "Entrer nombre de terrains", vbCritical, "Club de Pétanque les Cigales"
Exit Sub
End If
If TextBoxConte < 4 Or TextBoxConte > 90 Then
MsgBox "Vous n'avez pas respecté le nombre de joueurs", vbCritical, "Club de Pétanque les Cigales"
Exit Sub
End If
If OptionButtonManche4 = False And OptionButtonManche4 = False And OptionButtonManche4 = False Then
MsgBox "Vous devez choisir un Nombre de Manches avant de valider", vbCritical, "Club de Pétanque les Cigales"
Exit Sub
Else
Sheets("liste").Range("A2:A" & Sheets("liste").[A1000].End(xlUp).Row).ClearContents
For Each Checkliste In ListView1.ListItems
If Checkliste.Checked = True Then
i = i + 1: Sheets("liste").Cells(i + 1, 1) = Checkliste
j = j + 1
End If
Next
End If
If j = 0 Then MsgBox "Vous n'avez pas selectionné de joueurs", vbCritical, "C": Exit Sub
With Sheets("Classement")
.Unprotect
.Range("A1") = "Classement tournoi du " & Format(Date, "DD-MM-YYYY")
.Protect
End With |
Partager