Sub ajoutclient()
Dim mouvement As String
Dim compte As String
Dim montant As String
Dim libelle As String
'trouver les informations du contenu
mouvement = Worksheets("accueil").Range("c7").Value
compte = Worksheets("accueil").Range("c9").Value
montant = Worksheets("accueil").Range("c11").Value
libelle = Worksheets("accueil").Range("c13").Value
'si les champs ne sont pas remplis
If mouvement = "" Or compte = "" Or montant = "" Or libelle = "" Then
MsgBox ("Merci de renseigner les champs vide")
Sheets("Accueil").Select
Range("C7").Select
'si tous les champs sont remplis
Else
Application.DisplayStatusBar = True 'aff barre '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Application.StatusBar = "VEUILLEZ PATIENTER ! ..." 'message <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
'ajouter une ligne
Sheets("Compte client").Select
Range("a12").Select
ActiveCell.End(xlDown).Select
Selection.ListObject.ListRows.Add AlwaysInsert:=True
'ajouter aussi le compte client
Sheets("Accueil").Select
Range("C5").Select
Selection.Copy
Sheets("Compte client").Select
Range("A12").Select
ActiveCell.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "m/d/yyyy"
Sheets("Accueil").Select
Range("C9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Compte client").Select
Range("B12").Select
ActiveCell.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Accueil").Select
Range("C13").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Compte client").Select
Range("C10000").Select
ActiveCell.End(xlUp).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Accueil").Select
Range("C11").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Compte client").Select
Range("H10000").Select
ActiveCell.End(xlUp).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Accueil").Select
Range("C7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Compte client").Select
Range("I10000").Select
ActiveCell.End(xlUp).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'supprimer les données saisies dans la page accueil
Sheets("Accueil").Select
Range("C11").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("C9").Select
Selection.ClearContents
ComboBox1 = ""
Range("C13").Select
Selection.ClearContents
Range("C7").Select
Selection.ClearContents
ActiveWorkbook.Save
'terminé
Application.StatusBar = "OPERATION TERMINÉE !" ' efface <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
T! = Timer: While Abs(Timer - T) < 1: Wend 'pause 1 sec aff.msg
Application.StatusBar = "" ' efface <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
End If
End Sub