Userformda textbox toplama ve çıkarma işlemi

Katılım
31 Aralık 2018
Mesajlar
16
Excel Vers. ve Dili
2010 tr
Merhaba ustalarım. Aslında basit bir işlem ancak çıkamadım işin içinden 3 gündür denemediğim şey kalmadı. Proje görselinden anlaşılacağı gibi yapmak istediğim müşteriden ödeme aldıkça ödeme ekranına girince bunları toplayıp toplam borç bakiyesinden düşmesi. toplama ve çıkarma işlemini yapıyorum ancak textbox lardaki formatları para birimi yapınca işlem yapmıyor ve ya yapsa bile listbox tan çağırınca format bozuluyor . çok kod denedim ve projeyi çorba ettim iyice. Rica etsem kodları düzenleyebilir misiniz.


 
Katılım
31 Aralık 2018
Mesajlar
16
Excel Vers. ve Dili
2010 tr
Korhan Bey bu şekilde çalıştı ancak şimdide sadece 2 haneli sayıları topluyor 3 haneli sayı yazınca bozuluyor.

Private Sub TextBox6_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox6 = Format(TextBox6, "#,##0.00 TL")

End Sub

Private Sub TextBox7_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox19 = topla()
TextBox20 = Replace(Val(TextBox6), " TL", "") - Val(TextBox7)
TextBox7 = Format(TextBox7, "#,##0.00 TL")
TextBox20 = Format(TextBox20, "#,##0.00 TL")
End Sub

Private Sub TextBox8_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox19 = topla()
TextBox8 = Format(TextBox8, "#,##0.00 TL")
TextBox20 = Format(Replace(Val(TextBox6), " TL", "") - Val(TextBox19), "#,##0.00 TL")
TextBox19 = Format(TextBox19, "#,##0.00 TL")

End Sub
Private Sub TextBox9_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox19 = topla()
TextBox9 = Format(TextBox9, "#,##0.00 TL")
TextBox20 = Format(Replace(Val(TextBox6), " TL", "") - Val(TextBox19), "#,##0.00 TL")
TextBox19 = Format(TextBox19, "#,##0.00 TL")

End Sub
Private Sub TextBox10_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox19 = topla()
TextBox10 = Format(TextBox10, "#,##0.00 TL")
TextBox20 = Format(Replace(Val(TextBox6), " TL", "") - Val(TextBox19), "#,##0.00 TL")
TextBox19 = Format(TextBox19, "#,##0.00 TL")

End Sub
Private Sub TextBox11_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox19 = topla()
TextBox11 = Format(TextBox11, "#,##0.00 TL")
TextBox20 = Format(Replace(Val(TextBox6), " TL", "") - Val(TextBox19), "#,##0.00 TL")
TextBox19 = Format(TextBox19, "#,##0.00 TL")

End Sub
Private Sub TextBox12_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox19 = topla()
TextBox12 = Format(TextBox12, "#,##0.00 TL")
TextBox20 = Format(Replace(Val(TextBox6), " TL", "") - Val(TextBox19), "#,##0.00 TL")
TextBox19 = Format(TextBox19, "#,##0.00 TL")

End Sub
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,727
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
VAL yerine CDBL deneyebilirsiniz.
 
Üst