Tüm Versiyonu Göster : Metin Kutusuna Girlilen Yazının Para Birimi Şeklinde Olma
sakaryali
15-07-2004, 14:42
Merhaba
Herhangi bir metin kutusuna girilecek sayıyı para birimi şekline nasıl çevirebilirim?
Ã?rneğin 10000000 yerine 10,000,000 nasıl yazdırabilirim?
TextBox nesnesine girildiğinde bu işin yapılması için biraz daha uzun kod yazmak lazım.
Onun yerine, TextBox nesnesinden "cursor - imleç" çıktığında bu işin yapılmasını istersen;
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "#,### TL")
End Sub
Ve, eğer az önce rastladığım senin diğer bir mesajında bu işin yapılmasını istersen;
Private Sub TextBox1_Change()
RefreshTxtBx
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "#,### TL")
End Sub
'
Private Sub TextBox2_Change()
RefreshTxtBx
End Sub
'
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox2 = Format(TextBox2, "#,### TL")
End Sub
'
Private Sub RefreshTxtBx()
Dim Val1 As Double, Val2 As Double
On Error Resume Next
Val1 = TextBox1
Val2 = TextBox2
On Error GoTo 0
TextBox3 = Format(Val1 + Val2, "#,### TL")
End Sub
vBulletin v3.7.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.