1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| Sheets(ComboBox4.Text).Select
Dim Der_ligne As Integer
Der_ligne = Range("A65536").End(xlUp).Row + 1
ActiveCell.Offset(1, 0).Select
Selection.BorderAround Weight:=xlThin, ColorIndex:=xlAutomatic
For i = 1 To 9
ActiveCell.Offset(0, 1).Select
Selection.BorderAround Weight:=xlThin, ColorIndex:=xlAutomatic
Next i
Cells(Der_ligne, 1) = Label50 + TextBox1
'ActiveCell.(ActiveCell.Row, 0) = Label50 + TextBox1
'TextBox2.Value = jj
Cells(Der_ligne, 2) = TextBox18 'N° chéque
Cells(Der_ligne, 3) = Date$
mydate = TextBox2.Value
mystr = Format(mydate, "dd/mm/yy")
Cells(Der_ligne, 3) = DateValue(mystr) ' Date du chèque"
Cells(Der_ligne, 4) = ComboBox4 ' N° chèque
Cells(Der_ligne, 5) = ComboBox3.Value 'analytique
Cells(Der_ligne, 6) = ComboBox2.Value 'tiers
Cells(Der_ligne, 7) = ComboBox5.Value 'libellé
Cells(Der_ligne, 8) = TextBox11.Value 'Qté
Cells(Der_ligne, 9) = ComboBox1.Value 'N° de cpte
If TextBox5.Value <= "0" Then GoTo fin3
Cells(Der_ligne, 10) = "0.00"
Selection.HorizontalAlignment = xlRight
Cells(Der_ligne, 10) = Val(TextBox5.Value) ' Montant du Débit
Cells(Der_ligne, 11) = "D" ' sens opération
GoTo fin6
fin3:
If TextBox6.Value <= "0" Then GoTo fin4
Cells(Der_ligne, 10) = "0.00"
Selection.HorizontalAlignment = xlRight
Cells(Der_ligne, 10) = Val(TextBox6.Value) ' Montant du crédit
Cells(Der_ligne, 11) = "C" ' sens opération
GoTo fin6
fin4:
fin6:
Cells(Der_ligne, 12) = Val(TextBox12.Value) ' Montant du crédit
Selection.NumberFormat = "0"
Selection.HorizontalAlignment = xlRight
Cells(Der_ligne, 13) = TextBox14.Value 'code banque (udogec)
Cells(Der_ligne, 14) = TextBox15.Value 'code Analytique (udogec) |
Partager