• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

TextBox'a gelen değerin sonunda TL olması

yamahato

Altın Üye
Katılım
20 Mayıs 2009
Mesajlar
236
Excel Vers. ve Dili
excel 2007
Merhaba herkese
ListBox gelen değere tıkladığım da o değerin fiyatı TextBox4 geliyor ama sayfada TL gözükse de Textbox4 te sadece sayı gözüküyor ve virgülden sonra bazen veriyi aldığı yerde ki ondalık durumuna 4 haneye kadar rakam çıkıyor.
Sizden ricam
1.Yani 192.45 değilde 192,45 TL olabilir mi?
2. 192,45689 TL DEĞİLDE 192,45 olabilir mi?

' *************** LıstBox 1 de tıklayınca bilgileri görme***************

Private Sub ListBox1_Change()
If IsNull(ListBox1.Value) = True Then TextBox2.Text = "": Exit Sub '<-------------------

Set s1 = Sheets("SAHİBİNDEN")
son = s1.Cells(Rows.Count, "A").End(3).Row
sat = WorksheetFunction.Match(ListBox1.Value, s1.Range("A1:A" & son), 0)
TextBox2.Text = s1.Cells(sat, "B")


Set s1 = Sheets("STOK")
son = s1.Cells(Rows.Count, "B").End(3).Row
On Error Resume Next
If IsError(WorksheetFunction.Match(ListBox1.Value, s1.Range("b1:b" & son), 0)) Then
TextBox3.Text = "Bulunamadı.": Exit Sub
Else
sat = WorksheetFunction.Match(ListBox1.Value, s1.Range("b1:b" & son), 0)
End If
If IsError(s1.Cells(sat, "I")) Then TextBox3.Text = "Hiç alım yapılmamış." Else TextBox3.Text = s1.Cells(sat, "I")
Err.Clear


Set s1 = Sheets("STOK")
son = s1.Cells(Rows.Count, "B").End(3).Row
sat = WorksheetFunction.Match(ListBox1.Value, s1.Range("B1:B" & son), 0)
TextBox4.Text = s1.Cells(sat, "H")
 
Kodlarınızın sonundaki ilgili kısmı aşağıdaki şekilde değiştirp deneyin.
Kod:
...
TextBox4.Text = Format(s1.Cells(sat, H), "00.00")
 
TextBox4.Text = s1.Cells(sat, "H") satırından sonra aşağıdaki kodu ekleyip deneyin.

Kod:
TextBox4.Text = Format(TextBox4, ("#,##0.00")) & " TL"
 
Bu şekilde de olur.
Kod:
Sayfa1.TextBox1 = Format(Sayfa1.TextBox1, "#,##0.00 TL")
 
Sayenizde çözdüm. Teşekkür ederim hepinize. Konuyu cevap yazmaya nasıl kapatacağız.
 
Geri
Üst