r<Pivate Sub GarnirLabel()
Dim Revenus As Currency, Charges As Currency, Endettement As Currency
LabRevenus = Revenus
Revenus = Format(TVL(1, 33) + TVL(1, 71) + TVL(1, 113) * 0.7 + TVL(1, 118) * 0.7 + TVL(1, 123) * 0.7 + TVL(1, 128) * 0.7 + TVL(1, 133) * 0.7, "0 000.00 €")
LabCharges = Charges
Charges = LabCharges.Caption = Format(TVL(1, 16) + TVL(1, 54) + TVL(1, 83) + TVL(1, 89) + TVL(1, 95) + TVL(1, 101) + TVL(1, 107), "0 000.00 €")
LabEndettement.Caption = Format(100 * Charges / Revenus, "0.00 %")
Revenus = Format(TVL(1, 33) + TVL(1, 71) + TVL(1, 113) * 0.7 + TVL(1, 118) * 0.7 + TVL(1, 123) * 0.7 + TVL(1, 128) * 0.7 + TVL(1, 133) * 0.7, "0 000.00 €")
LabRevenus Format(Revenus, "0 000.00 €")
Dim Revenus As Currency, Charges As Currency, Endettement As Currency
Revenus = (TVL(1, 33) + TVL(1, 71) + TVL(1, 113) * 0.7 + TVL(1, 118) * 0.7 + TVL(1, 123) * 0.7 + TVL(1, 128) * 0.7 + TVL(1, 133) * 0.7)
LabRevenus = Format(Revenus, "0 000.00 €")
Charges = (TVL(1, 16) + TVL(1, 54) + TVL(1, 83) + TVL(1, 89) + TVL(1, 95) + TVL(1, 101) + TVL(1, 107))
LabCharges = Format(Charges, "0 000.00 €")
'Endettement = (Charges / Revenus)
'LabEndettement = Format(Endettement, "0.00 %")
Dim Revenus As Currency, Charges As Currency
Revenus = (TVL(1, 33) + TVL(1, 71) + TVL(1, 113) * 0.7 + TVL(1, 118) * 0.7 + TVL(1, 123) * 0.7 + TVL(1, 128) * 0.7 + TVL(1, 133) * 0.7)
LabRevenus = Format(Revenus, "0 000.00 €")
Charges = (TVL(1, 16) + TVL(1, 54) + TVL(1, 83) + TVL(1, 89) + TVL(1, 95) + TVL(1, 101) + TVL(1, 107))
LabCharges = Format(Charges, "0 000.00 €")
LabEndettement.Caption = Format(100 * Charges / Revenus, "0.00 %")
End sub
If CAM.Mode = "CalcLab" Then CA.ValeursVers TVL: GarnirLabel
Exact. Je viens de tester. J'étais persuadé que le "%" dans le second paramètre de la fonction VB.Format n'affectait pas la manière dont le nombre proprement dit était affiché. Je croyais que ça ne l'affectait que dans les formats de cellules.
[/QUOTE
Ce n'est pas moi qui vait te faire des commentaire ca s'est sur
Par contre est ce que maintenant la procèdure de mise en forme en fonction du résultat endettement >33% va fonctionner ? car c'était affecté à une Tbx initiallement ,
VB:CA.Add TBxSRev, "Total Revenus", Format:="0 000.00 €" CA.Add TBxSChar, "Total Charges", Format:="0 000.00 €" CA.Add TBxSEnd, "Taux End Act", Format:="00 %", Mode:="RougeGras" 'CA.Add TBxSEnd, "Taux End Act", Format:="00 %" CA.Add TBxSMen, "Mensualité possible", Format:="0 000.00 €" CA.Add TBxPTota, "Total Projet", Format:="0 000.00 €" CA.Add TBxFTota, "Total Financement", Format:="0 000.00 €" '.Text = Format(TVLF(1, 197), "0.00 €") CL.CouleurSympa CL.Actualiser 'If Not Me.ActiveControl Is FrmC Then CL.Stopper End Sub
j'ai également rajouter un labmensualité possible