Private Sub Ajouter_Click()
Dim Ligne As Integer
With Sheets("Tableau")
Ligne = Sheets("Tableau").Range("A65536").End(xlUp).Row + 1
.Range(Cells(Ligne, 1), Cells(Ligne, 22)).ClearContents ' Clear tableau Ligne, colonnes 2 à 22
.Cells(Ligne, 1) = PhaseProjet
.Cells(Ligne, 5) = Com
.Cells(Ligne, 6) = Dess
.Cells(Ligne, 7) = Met
.Cells(Ligne, 8) = Cond
.Cells(Ligne, 9) = Client
.Cells(Ligne, 10) = DossierComplet
.Cells(Ligne, 11) = ElementsManquant
.Cells(Ligne, 12) = Remarques
.Cells(Ligne, 16) = Chauffage
.Cells(Ligne, 17) = Style
.Cells(Ligne, 18) = Fondations
.Cells(Ligne, 19) = Forme
.Cells(Ligne, 20) = Vendu
' Traitement si vide qd CDate ou CDBl utilisés.
If DateDemande <> "" Then .Cells(Ligne, 2) = CDate(DateDemande)
If DateRdv <> "" Then .Cells(Ligne, 3) = CDate(DateRdv)
If Delais <> "" Then .Cells(Ligne, 4) = CDbl(Delais)
If Budget <> "" Then .Cells(Ligne, 13) = CDbl(Budget)
If SurfacePonderee <> "" Then .Cells(Ligne, 14) = CDbl(SurfacePonderee)
If Ratio <> "" Then .Cells(Ligne, 15) = CDbl(Ratio)
If PrixVente <> "" Then .Cells(Ligne, 21) = CDbl(PrixVente)
If RatioV <> "" Then .Cells(Ligne, 22) = CDbl(RatioV)
End With
If Delais <= 3 Then
Sheets("Tableau").Cells(Ligne_insertion, 4).Interior.ColorIndex = 3
Else
If Delais <= 6 Then
Sheets("Tableau").Cells(Ligne_insertion, 4).Interior.ColorIndex = 46
Else
If Delais <= 9 Then
Sheets("Tableau").Cells(Ligne_insertion, 4).Interior.ColorIndex = 44
Else
Sheets("Tableau").Cells(Ligne_insertion, 4).Interior.ColorIndex = 43
End If
End If
End If
End Sub