Sub noteEnregistrer_clismck()
If Me.ComboBox1 = "" Then 'alors message d'alerte
Beep 'Bip d'alerte
MsgBox "Sélectionnez un matricule dans la liste"
Me.ComboBox1.SetFocus 'je me replace sur le combobox
Exit Sub
End If
'et je sors du Sub
onglet = Array("notet1", "notet2", "notet3")
With Sheets(onglet(ComboBox2.ListIndex))
lig = Application.Match(Val(ComboBox1.Value), .[B:B], 0)
If Not IsNumeric(lig) Then lig = Application.CountA(.[B:B]) + 3
.Cells(lig, 2) = Val(ComboBox1.Value)
.Cells(lig, 3) = lblsexe: .Cells(lig, 4) = lblnom: .Cells(lig, 5) = lblprenom
For k = 1 To 14
If IsNumeric(ufnote.Controls("TextBox" & k)) Then
.Cells(lig, k + 5) = CDbl(ufnote.Controls("TextBox" & k))
Else
.Cells(lig, k + 5) = ""
End If
ufnote.Controls("TextBox" & k) = ""
Next
ComboBox1 = ""
End With
End Sub