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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
| Option Explicit
Dim Plage As Range
Dim E As Integer
Dim B As Integer
Dim C As Integer
Dim D As Integer
Dim A As Integer
'F pour la ligne dans compta'
Dim F As Integer
'G pour la valeur de E14'
Dim G As Integer
Private Sub UserForm_Initialize()
Worksheets("facture").Select
dat.Caption = Range("B2").Text + Range("D2").Text + Range("C2").Text
Worksheets("compta").Range("B7:C16").ClearContents
Worksheets("facture").Range("E6:E14").ClearContents
NombreVieux.Locked = True
NombreJeune.Locked = True
NombreGroupe.Locked = True
NombreTN.Locked = True
If Worksheets("facture").Cells(2, 5).Value = 2 Then
Tarifs.Visible = False
Else
Tarifs.Visible = True
CheckTL.Locked = True
End If
Mode.Visible = False
Suivant.Visible = False
Fin.Visible = False
F = 7
End Sub
Private Sub NombreTN_AfterUpdate()
A = NombreTN.Value
Worksheets("facture").Cells(7, 5).Value = A
End Sub
Private Sub CheckTN_Click()
If CheckTN.Value = False Then
NombreTN.Locked = True
Else
NombreTN.Locked = False
End If
End Sub
Private Sub NombreVieux_AfterUpdate()
E = NombreVieux.Value
Worksheets("facture").Cells(9, 5).Value = E
End Sub
Private Sub CheckVieux_Click()
If CheckVieux.Value = False Then
NombreVieux.Locked = True
Else
NombreVieux.Locked = False
End If
End Sub
Private Sub NombreTL_AfterUpdate()
B = NombreTL.Value
Worksheets("facture").Cells(6, 5).Value = B
End Sub
Private Sub CheckTL_Click()
If CheckTL.Value = False Then
NombreTL.Visible = False
Else
NombreTL.Visibe = True
End If
End Sub
Private Sub NombreGroupe_AfterUpdate()
C = NombreGroupe.Value
Worksheets("facture").Cells(11, 5).Value = C
End Sub
Private Sub CheckGroupe_Click()
If CheckGroupe.Value = False Then
NombreGroupe.Locked = True
Else
NombreGroupe.Locked = False
End If
End Sub
Private Sub NombreJeune_AfterUpdate()
D = NombreJeune.Value
Worksheets("facture").Cells(8, 5).Value = D
End Sub
Private Sub CheckJeune_Click()
If CheckJeune.Value = False Then
NombreJeune.Locked = True
Else
NombreJeune.Locked = False
End If
End Sub
Private Sub Valider_Click()
Mode.Visible = True
If Worksheets("facture").Cells(2, 5).Value = 2 Then
Worksheets("facture").Cells(14, 5) = B
G = B
Else
Worksheets("facture").Cells(14, 5).Value = A + C + D + E
G = A + C + D + E
End If
Worksheets("compta").Cells(F, 2).Value = G
End Sub
Sub suivant_fin()
Suivant.Visible = True
Fin.Visible = True
End Sub
Private Sub OptionCB_Click()
If OptionCB.Value = True Then
suivant_fin
Else
End
End If
MsgBox ("Vous devez " & Worksheets("facture").Cells(14, 6).Value & " par Carte Bancaire")
Worksheets("compta").Cells(F, 3).Value = "carte bancaire"
nombre_f
End Sub
Private Sub OptionEspece_Click()
If OptionEspece.Value = True Then
suivant_fin
Else
End
End If
MsgBox ("Vous devez " & Worksheets("facture").Cells(14, 6).Value & " en Espèces")
Worksheets("compta").Cells(F, 3).Value = "espèces"
nombre_f
End Sub
Private Sub OptionCheque_Click()
If OptionCheque.Value = True Then
suivant_fin
Else
End
End If
MsgBox ("Vous devez " & Worksheets("facture").Cells(14, 6).Value & " en Chèque")
Worksheets("compta").Cells(F, 3).Value = "chèque"
nombre_f
End Sub
Sub nombre_f()
If F > 16 Then
Suivant.Visible = False
Else
Suivant.Visible = True
End If
End Sub
Private Sub Fin_Click()
End
End Sub |
Partager