• DİKKAT

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

Soru Textbox hesaplama hatası

sirkülasyon

Altın Üye
Katılım
10 Temmuz 2012
Mesajlar
2,543
Excel Vers. ve Dili
2021 LTSC TR
Kod:
If TextBox3.Value <> "" And TextBox2.Value <> "" Then
TextBox6.Value = Format(CDbl(TextBox3) * CDbl(TextBox5), "#,##0.00")
Exit Sub
ElseIf TextBox3.Value <> "" And TextBox2.Value <> "" And TextBox4.Value = "Evet" Then
TextBox6.Value = Format(CDbl(TextBox3) * CDbl(TextBox5), "#,##0.00")
TextBox7.Value = Format(CDbl(TextBox6 * 8 / 100), "#,##0.00")
TextBox8.Value = Format(CDbl(TextBox6) + CDbl(TextBox7), "#,##0.00")
Exit Sub
ElseIf TextBox3.Value <> "" And TextBox2.Value <> "" And TextBox4.Value = "Hayır" Then
TextBox6.Value = Format(CDbl(TextBox3) * CDbl(TextBox5), "#,##0.00")
TextBox7.Value = ""
TextBox8.Value = Format(CDbl(TextBox3) * CDbl(TextBox5), "#,##0.00")
Exit Sub
End If
Yukarıdaki kodda
TextBox4.Value = "Evet" Then ise
ya da
TextBox4.Value = "Hayır" Then ise
kısmı bir türlü işlem yapmadı. Rica etsem hatamı düzeltmeme yardımcı olabilir misiniz?
 
Yanlış anlamadıysam mantıklı sınama bu şekilde olmalı....

C#:
If TextBox3.Value <> "" And TextBox2.Value <> "" Then
    TextBox6.Value = Format(CDbl(TextBox3) * CDbl(TextBox5), "#,##0.00")

    If TextBox4.Value = "Evet" Then
        TextBox7.Value = Format(CDbl(TextBox6) * 0.08, "#,##0.00")
        TextBox8.Value = Format(CDbl(TextBox6) + CDbl(TextBox7), "#,##0.00")
    Else
        TextBox7.Value = ""
        TextBox8.Value = Format(CDbl(TextBox3) * CDbl(TextBox5), "#,##0.00")
    End If

End If

.
 
Son düzenleme:
Zeki Abi
Teşekkür ederim
 
Geri
Üst