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
|
Dim intError As Integer
Dim intError2 As Integer
Dim intError3 As Integer
Private Sub cmdCalc_Click()
intNum = txtHT.Text
If cmbTaux.Text = "19.6%" Then
lblTOT.Caption = intNum + intNum * 0.196
ElseIf cmbTaux.Text = "5.5%" Then
lblTOT.Caption = intNum + intNum * 0.055
Else
intError = MsgBox("Erreur de Calcul, veuillez choisir un taux de TVA , Merci.", vbOKOnly + vbExclamation, "Erreur de calcul!")
End If
End Sub
Private Sub cmdConvert_Click()
intTOT2 = lblTOT.Caption
If lblE2.Caption = "" Then
intNum = txtHT.Text
intTOT2 = lblTOT.Caption
txtHT.Text = intNum * 6.55957
lblTOT.Caption = intTOT2 * 6.55957
lblE.Caption = "F"
lblE2.Caption = "F"
cmdConvert.Caption = "C&onvertir en Euro(s)"
ElseIf lblE2.Caption = "F" Then
intNum = txtHT.Text
intTOT2 = lblTOT.Caption
txtHT.Text = intNum / 6.55957
lblTOT.Caption = intTOT2 / 6.55957
lblE.Caption = ""
lblE2.Caption = ""
cmdConvert.Caption = "C&onvertir en Franc(s)"
End If
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdReturn_Click()
frmHt.Hide
frmChoice.Show
Unload Me
End Sub
Private Sub Form_Load()
cmbTaux.AddItem "5.5%"
cmbTaux.AddItem "19.6%"
End Sub
Private Sub mnuControlCalcul_Click()
intNum = txtHT.Text
If cmbTaux.Text = "19.6%" Then
lblTOT.Caption = intNum + intNum * 0.196
ElseIf cmbTaux.Text = "5.5%" Then
lblTOT.Caption = intNum + intNum * 0.055
Else
intError = MsgBox("Erreur de Calcul, veuillez choisir un taux de TVA , Merci.", vbOKOnly + vbExclamation, "Erreur de calcul!")
End If
End Sub
Private Sub mnuControlConver_Click()
intTOT2 = lblTOT.Caption
If lblE2.Caption = "" Then
intNum = txtHT.Text
intTOT2 = lblTOT.Caption
txtHT.Text = intNum * 6.55957
lblTOT.Caption = intTOT2 * 6.55957
lblE.Caption = "F"
lblE2.Caption = "F"
mnuControlConver.Caption = "Convertir en Euro(s)"
ElseIf lblE2.Caption = "F" Then
intNum = txtHT.Text
intTOT2 = lblTOT.Caption
txtHT.Text = intNum / 6.55957
lblTOT.Caption = intTOT2 / 6.55957
lblE.Caption = ""
lblE2.Caption = ""
mnuControlConver.Caption = "Convertir en Franc(s)"
End If
End Sub
Private Sub mnuControlTTC_Click()
frmHt.Hide
frmTTC.Show
End Sub
Private Sub mnuFileExit_Click()
End
End Sub
Private Sub mnuFileLook_Click()
If lblE2.Caption = "F" Then
intError2 = MsgBox("Attention! Impossible d 'afficher l'aperçu, le prix doit être en Euro(s), TVA+ se chargera dans l'aperçu de le mettre en Franc(s). Merci.", vbCritical + vbOKOnly, "Erreur d'affichage")
ElseIf txtHT.Text = "00.00" Then
intError3 = MsgBox("Attention! Impossible d'afficher l'aperçu car il faut que le prix TTC soit calculer merci.", vbOKOnly + vbCritical, "Attention")
Else
frmLook.Show
End If
End Sub |
Partager