• DİKKAT

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

Yüzde Yuvarlama Yardım....

Katılım
7 Nisan 2007
Mesajlar
112
Excel Vers. ve Dili
xp
Arkadaşlar kodum bu
Kod:
 Private Sub TextBox7_Change()
If TextBox5 > "0" And TextBox7 > "0" Then
TextBox8.Text = "% " & CDbl(TextBox5) / CDbl(TextBox7)
TextBox8.Enabled = False
Else
TextBox8 = ""
End If
End Sub

bu koda
textbox5 114,04 TL
Textbox7 756,95 TL

değer girdiğimde TextBox8 bu değeri vermekte

% 0,150657242882621

ben %15 yada %15.00 yada 0,15 olarak göstersin istiyorum yardımcı olur musunuz?
 
Arkadaşlar kodum bu
Kod:
 Private Sub TextBox7_Change()
If TextBox5 > "0" And TextBox7 > "0" Then
TextBox8.Text = "% " & CDbl(TextBox5) / CDbl(TextBox7)
TextBox8.Enabled = False
Else
TextBox8 = ""
End If
End Sub
bu koda
textbox5 114,04 TL
Textbox7 756,95 TL

değer girdiğimde TextBox8 bu değeri vermekte

% 0,150657242882621

ben %15 yada %15.00 yada 0,15 olarak göstersin istiyorum yardımcı olur musunuz?

Merhaba;
Kod:
TextBox8.Text = "% " & CDbl(TextBox5) / CDbl(TextBox7)
Kod:
[COLOR=Red]TextBox8.Text =[/COLOR][COLOR=Blue]Format(CDbl(TextBox5) / CDbl(TextBox7), "0%")
şeklinde değiştirip deneyin.
[/COLOR]
 
Geri
Üst