Private Sub CommandButton1_Click() Dim Lig As Long ' Prochaine ligne vide du tableau
If UserForm2.TextBox1.Value = "" Then
MsgBox " Le champ SOCIETE est obligatoire . "
Exit Sub
Else
' Avec l'OBJET CONTENEUR (feuille de destination)
With Sheets("Feuil1")
' Mémoriser la prochaine ligne vide
' NE PAS OUBLIER le "." POINT devant RANGE
Lig = .Range("A65536").End(xlUp).Offset(1, 0).Row
.Range("A" & Lig).Value = UserForm2.TextBox1.Value
.Range("B" & Lig).Value = UserForm2.TextBox11.Value
' gestion des nombres commençant par 0 avec " ' "
.Range("C" & Lig).Value = "'" & UserForm2.TextBox2.Value
.Range("D" & Lig).Value = "'" & UserForm2.TextBox3.Value
.Range("E" & Lig).Value = UserForm2.TextBox4.Value
.Range("F" & Lig).Value = "'" & UserForm2.TextBox5.Value
.Range("G" & Lig).Value = UserForm2.TextBox6.Value
.Range("H" & Lig).Value = "'" & UserForm2.TextBox7.Value
.Range("I" & Lig).Value = UserForm2.TextBox8.Value
.Range("J" & Lig).Value = UserForm2.TextBox9.Value
.Range("K" & Lig).Value = UserForm2.TextBox10.Value
.Range("L" & Lig).Value = UserForm2.TextBox13.Value
.Range("M" & Lig).Value = UserForm2.TextBox19.Value
End With
'ActiveWorkbook.Save
'MsgBox " La fiche est créée "
'comptage nb de fiches
Call calculnombrefiches
'sortir
'Unload UserForm2
Unload Me
End If
End Sub