' Enregistrement ou mise à jour infos Facture
Private Sub SaveInfos(Facture As Worksheet, FactureClients As Worksheet, ByVal i As Long)
With FactureClients
.Rows(i).Insert Shift:=xlDown
.Cells(i, 1) = Facture.Range("L4") ' Réf
.Cells(i, 2) = Facture.Range("N11") ' N°
.Cells(i, 3) = Facture.Range("I17") ' Date
.Cells(i, 4) = Facture.Range("I10") ' N° Facture
.Cells(i, 5) = Facture.Range("C13") ' Nom
.Cells(i, 7) = Facture.Range("C14") ' Adresse
.Cells(i, 8) = Facture.Range("C15") ' Code P.
.Cells(i, 9) = Facture.Range("F15") ' Ville
.Cells(i, 10) = Facture.Range("C16") ' Tél.
.Cells(i, 11) = Facture.Range("F16") ' Portable
.Cells(i, 12) = Facture.Range("C17") ' Fax
.Cells(i, 13) = Facture.Range("F17") ' E-mail
.Cells(i, 3).NumberFormat = "m/d/yyyy"
'.Hyperlinks.Add .Cells(i, 5), SaveFacture(Facture) ' Lien hyperlink
.Cells(i, 5).Font.Size = 9
.Cells(i, 14) = Facture.Range("J36") ' Montant HT
.Cells(i, 15) = Facture.Range("J38") ' Montant TVA 19.6 %
.Cells(i, 16) = Facture.Range("J39") ' Montant TVA 5.5 %
.Cells(i, 18) = Facture.Range("J41") ' Montant TTC
.Cells(i, 17) = Facture.Range("J40") ' Montant TVA
End With
MsgBox "Infos facture " & Sh1.Range("I10") & " enregistrées !", 64
End Sub