Bonsoir,
Voici un code qui fait ce que vous souhaitez, vous n'avez plus qu'a l'adapter à vos besoins ( nom Feuille, nom UserForm, noms TextBoxs, etc)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Sub NouCli() 'Entre les valeurs des Textbox dans la première ligne vide
Dim L As Integer
With Sheets("BDdata")
L = .Range("A65536").End(xlUp)(2).Row 'Donne le nombre de la première ligne vide dans la variable L
.Range("A" & L).Value = UFClients.TextBox1.Value
.Range("B" & L).Value = UFClients.TextBox2.Value
.Range("C" & L).Value = UFClients.TextBox3.Value
.Range("D" & L).Value = UFClients.TextBox4.Value
.Range("E" & L).Value = UFClients.TextBox5.Value
.Range("F" & L).Value = UFClients.TextBox6.Value
.Range("G" & L).Value = UFClients.TextBox7.Value
.Range("H" & L).Value = UFClients.TextBox8.Value
End With
End Sub |
Cordialement

Partager