Private Sub enregistrerbonentree_Click()
Sheets("ENTREE").Activate
Sheets("ENTREE1").Activate
Dim Xls, Xls1 As Worksheet, lLig, lLig1 As Long
Set Xls = ThisWorkbook.Worksheets("ENTREE")
Set Xls1 = ThisWorkbook.Worksheets("ENTREE1")
'Recherche la ligne disponible
lLig = 7
lLig1 = 2
While Xls.Cells(lLig, 1) <> "" And Xls1.Cells(lLig1, 1) <> ""
lLig = lLig + 1
lLig1 = lLig1 + 1
Wend
[COLOR="red"]Xls1.Cells(lLig1, 1) = jour.Value
Xls1.Cells(lLig1, 2) = bldefab.Value
Xls1.Cells(lLig1, 4) = pdstotal.Value
Xls1.Cells(lLig1, 3) = TextBox266.Value[/COLOR]
Xls.Cells(lLig, 1) = jour.Value
[COLOR="red"]Xls1.Cells(lLig1, 5) = ComboBox12.Value
Xls1.Cells(lLig1, 6) = TextBox868.Value
Xls1.Cells(lLig1, 7) = TextBox854.Value
Xls1.Cells(lLig1, 5) = ComboBox14.Value
Xls1.Cells(lLig1, 6) = TextBox867.Value
Xls1.Cells(lLig1, 7) = TextBox853.Value[/COLOR] Xls.Cells(lLig, 2) = bsd.Value
Xls.Cells(lLig, 3) = bldefab.Value
Xls.Cells(lLig, 4) = bltransp.Value
' Aiguillage selon la nature
LaListe = Array("Cartes", "Cartes de paiement", "cartes riches", "claviers", _
"composants electro", "compteurs", "contacteurs/disjonct", "copieur", _
"deee", "disques durs", "écrans crt", "écrans tft", "electro portatif", _
"encre & toner", "imprimante", "manettes de jeux", "non valorisable", _
"onduleur", "papier", "papier sensible", "pc portable", "pe-ld", _
"piles alcalines", "serveur", "traceur", "tubes d'écrans", "tubes fluo", "uc")
pos = Application.Match(ComboBox12, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox868.Value
Xls.Cells(lLig, colonne2) = TextBox854.Value
pos = Application.Match(ComboBox14, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox867.Value
Xls.Cells(lLig, colonne2) = TextBox853.Value
pos = Application.Match(ComboBox15, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox866.Value
Xls.Cells(lLig, colonne2) = TextBox849.Value
pos = Application.Match(ComboBox13, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox865.Value
Xls.Cells(lLig, colonne2) = TextBox824.Value
pos = Application.Match(ComboBox38, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox864.Value
Xls.Cells(lLig, colonne2) = TextBox823.Value
pos = Application.Match(ComboBox37, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox863.Value
Xls.Cells(lLig, colonne2) = TextBox822.Value
pos = Application.Match(ComboBox36, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox862.Value
Xls.Cells(lLig, colonne2) = TextBox821.Value
pos = Application.Match(ComboBox35, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox861.Value
Xls.Cells(lLig, colonne2) = TextBox820.Value
pos = Application.Match(ComboBox34, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox860.Value
Xls.Cells(lLig, colonne2) = TextBox819.Value
pos = Application.Match(ComboBox33, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox859.Value
Xls.Cells(lLig, colonne2) = TextBox818.Value
pos = Application.Match(ComboBox32, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox858.Value
Xls.Cells(lLig, colonne2) = TextBox817.Value
pos = Application.Match(ComboBox31, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox857.Value
Xls.Cells(lLig, colonne2) = TextBox816.Value
pos = Application.Match(ComboBox30, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox856.Value
Xls.Cells(lLig, colonne2) = TextBox815.Value
pos = Application.Match(ComboBox29, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox855.Value
Xls.Cells(lLig, colonne2) = TextBox814.Value
pos = Application.Match(ComboBox23, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox852.Value
Xls.Cells(lLig, colonne2) = TextBox813.Value
pos = Application.Match(ComboBox25, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox851.Value
Xls.Cells(lLig, colonne2) = TextBox848.Value
pos = Application.Match(ComboBox28, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox850.Value
Xls.Cells(lLig, colonne2) = TextBox847.Value
pos = Application.Match(ComboBox17, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox835.Value
Xls.Cells(lLig, colonne2) = TextBox846.Value
pos = Application.Match(ComboBox16, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox834.Value
Xls.Cells(lLig, colonne2) = TextBox845.Value
pos = Application.Match(ComboBox18, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox833.Value
Xls.Cells(lLig, colonne2) = TextBox844.Value
pos = Application.Match(ComboBox19, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox832.Value
Xls.Cells(lLig, colonne2) = TextBox843.Value
pos = Application.Match(ComboBox39, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox831.Value
Xls.Cells(lLig, colonne2) = TextBox842.Value
pos = Application.Match(ComboBox22, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox830.Value
Xls.Cells(lLig, colonne2) = TextBox841.Value
pos = Application.Match(ComboBox21, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox829.Value
Xls.Cells(lLig, colonne2) = TextBox840.Value
pos = Application.Match(ComboBox26, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox828.Value
Xls.Cells(lLig, colonne2) = TextBox839.Value
pos = Application.Match(ComboBox20, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox827.Value
Xls.Cells(lLig, colonne2) = TextBox838.Value
pos = Application.Match(ComboBox24, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox826.Value
Xls.Cells(lLig, colonne2) = TextBox837.Value
pos = Application.Match(ComboBox27, LaListe, 0)
colonne1 = (pos * 2) + 37 + pos - 1
colonne2 = (pos * 2) + 37 + pos
Xls.Cells(lLig, colonne1) = TextBox825.Value
Xls.Cells(lLig, colonne2) = TextBox836.Value
end sub