Metin Kutusuna Girlilen Yazının Para Birimi Şeklinde Olma

Katılım
14 Temmuz 2004
Mesajlar
17
Metin Kutusuna Girlilen Yazının Para Birimi Þeklinde Olma

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?
 

Haluk

𐱅𐰇𐰼𐰚
Katılım
7 Temmuz 2004
Mesajlar
12,291
Excel Vers. ve Dili
64 Bit 2010 - İngilizce
+
Google Sheets
+
JScript
Altın Üyelik Bitiş Tarihi
Özel kişi
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;

Kod:
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;

Kod:
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
 
Üst