Bonjour
remplacez votre code dans l'userform par celui-ci
Private Sub CommandButton1_Click()
Dim col as byte, dlig as byte
trouvecolonne (ComboBox1.Value)
col = trouvecolonne(ComboBox1.Value)
With Sheets("liste")
dlig = .Cells(65536, col).End(xlUp).Row + 1
If WorksheetFunction.CountA(.Range(.Cells(4, col), .Cells(dlig, col))) = 40 Then
MsgBox "Le groupe ne peut avoir plus de 40 personnes ! Veuillez choisir un autre groupe": Exit Sub
End If
.Cells(dlig, col) = CDbl(TextBox1.Text)
.Cells(dlig, col + 1) = TextBox2
.Cells(dlig, col + 2) = TextBox3
End With
End Sub
Si ok et terminé, merci de cloturer le fil en cliquant sur le petit v en haut à droite
Cordialement