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
| Private Sub cmd_charge_Click()
txt_charge.Text = txt_totalrepas.Text - txt_totalusagers.Text
End Sub
Private Sub Cmd_effacer_Click()
txt_internesDP.Text = ""
txt_profsbas.Text = ""
Txt_profshaut.Text = ""
Txt_agents.Text = ""
Txt_etudiants.Text = ""
Txt_personnesexterieures.Text = ""
txt_entrees.Text = ""
txt_coutautres.Text = ""
txt_dessert.Text = ""
txt_plat1.Text = ""
Txt_plat2.Text = ""
txt_prix1.Text = ""
txt_prix2.Text = ""
txt_total.Text = ""
txt_totalusagers.Text = ""
txt_charge.Text = ""
txt_perte.Text = ""
txt_reel.Text = ""
txt_totalrepas.Text = ""
End Sub
Private Sub Cmd_fin_Click()
End
End Sub
Private Sub cmd_perte_Click()
txt_perte.Text = txt_reel.Text - txt_totalusagers.Text
End Sub
Private Sub cmd_reel_Click()
txt_reel.Text = Val(txt_entrees.Text) * 0.27 + Val(txt_plat1.Text) * Val(txt_prix1.Text) + Val(Txt_plat2.Text) * Val(txt_prix2.Text) + Val(txt_dessert.Text) * 0.12 + Val(txt_coutautres.Text)
End Sub
Private Sub cmd_total_Click()
txt_total.Text = Val(Txt_agents.Text) + Val(Txt_etudiants.Text) + Val(txt_internesDP.Text) + Val(Txt_personnesexterieures.Text) + Val(txt_profsbas.Text) + Val(Txt_profshaut.Text)
End Sub
Private Sub cmd_totalrepas_Click()
txt_totalrepas.Text = txt_total.Text * 6
End Sub
Private Sub cmd_totalusagers_Click()
txt_totalusagers.Text = txt_profsbas.Text * 3.22 + Txt_profshaut.Text * 4.3 + txt_internesDP.Text * 2.25 + Txt_agents.Text * 2.8 + Txt_etudiants.Text * 4.1 + Txt_personnesexterieures.Text * 4.55
End Sub
Private Sub Cmd_enregistrer_Click()
F_enregistrer.Show
End Sub
Private Sub Form_Load()
numfic = FreeFile 'dossier libre créé
Open "txt_affichage.text" For Random As #numfic
Timer1.Enabled = True
Timer1.Interval = 1 'l'interval est le nbre de millisecondes au bout duquel l'évènement timer.timer a lieu
End Sub
Private Sub Timer1_Timer()
Dim today As Date
Lbl_today.Caption = Format$(Date, "dddd dd mmmm yyyy")
Lbl_today.Caption = UCase(Left(Lbl_today.Caption, 1)) & Right(Lbl_today.Caption, Len(Lbl_today.Caption) - 1)
Lbl_today.Caption = Lbl_today.Caption & " " & " " & Format$(Time, " - hh:mm:ss")
End Sub
Private Sub txt_coutautres_Change()
If Not IsNumeric(txt_coutautres.Text) Then
MsgBox "Veuillez insérez des chiffres!"
End If
If txt_coutautres.Text = "," Then
MsgBox " Veuillez insérer des points et non des virgules!"
End If
End Sub |
Partager