• DİKKAT

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

userform textbox toplama problemi

Katılım
23 Nisan 2017
Mesajlar
74
Excel Vers. ve Dili
excel 2010 türkçe
merhaba değerli arkadaşlar,

Hazırladığım bir userform var. Ancak bu formda farklı textboxlara girilen işlerde kdv leri toplatamıyorum. Örnek olarak ilk textboxa işyeri hekimi girelim 1000 tl yazalım. aşağıya %8 kısmına 80 tl çıkıyor. Burda problem yok. Ancak 2. textboxa da diğer sağlık personeli girelim. Ona da 500 tl yazalım. Bu sefer aşağıda sadece 40 tl %8 kdv çıkıyor. Halbuki 80+40 120 tl çıkması gerekiyor. Yani son yazdığımızı baz alıyor. Bunun aynısı %18 kdv için de geçerli. Bir türlü çözemediğim bir sorun. Umarım yardımcı olacak arkadaşlarımız çıkar. Şimdiden teşekkürler.
 

Ekli dosyalar

KDV yi devam ettirmiyor. Son girilen KDV yi alıyorsunuz. Aşağıdaki şekilde deneyin.
Kod:
Private Sub TextBox13_Change()

On Error Resume Next
    TextBox9 = TextBox8 + TextBox13 + TextBox17 + TextBox21 + TextBox25 + TextBox29 + TextBox33 + TextBox37
    KDV8 = TextBox11.Text
    KDV18 = TextBox10.Text
    If Err <> 0 Then TextBox9 = Empty
    
        If ComboBox3.Value = "İŞ GÜVENLİĞİ UZMANI" Then
    On Error Resume Next
    TextBox10 = KDV18 + Replace(TextBox13 * 0.18, ".", ",")
    
    If Err <> 0 Then TextBox10 = Empty
    End If
        If ComboBox3.Value = "İŞYERİ HEKİMİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
    If ComboBox3.Value = "DİĞER SAĞLIK PERSONELİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
    If ComboBox3.Value = "LABORATUVAR TAHLİLLERİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "SOLUNUM FONKSİYON TESTİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "ODYOMETRİ TESTİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "EKG" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "RÖNTGEN" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "İŞE GİRİŞ MUAYENESİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
    
    If ComboBox3.Value = "ORTAM ÖLÇÜMÜ" Then
    On Error Resume Next
    TextBox10 = KDV8 + Replace(TextBox13 * 0.18, ".", ",")
    
    If Err <> 0 Then TextBox10 = Empty
    End If
   
    If ComboBox3.Value = "RİSK DEĞERLENDİRME RAPORU" Then
    On Error Resume Next
    TextBox10 = KDV18 + Replace(TextBox13 * 0.18, ".", ",")
    
    If Err <> 0 Then TextBox10 = Empty
    End If
End Sub
 
KDV yi devam ettirmiyor. Son girilen KDV yi alıyorsunuz. Aşağıdaki şekilde deneyin.
Kod:
Private Sub TextBox13_Change()

On Error Resume Next
    TextBox9 = TextBox8 + TextBox13 + TextBox17 + TextBox21 + TextBox25 + TextBox29 + TextBox33 + TextBox37
    KDV8 = TextBox11.Text
    KDV18 = TextBox10.Text
    If Err <> 0 Then TextBox9 = Empty
    
        If ComboBox3.Value = "İŞ GÜVENLİĞİ UZMANI" Then
    On Error Resume Next
    TextBox10 = KDV18 + Replace(TextBox13 * 0.18, ".", ",")
    
    If Err <> 0 Then TextBox10 = Empty
    End If
        If ComboBox3.Value = "İŞYERİ HEKİMİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
    If ComboBox3.Value = "DİĞER SAĞLIK PERSONELİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
    If ComboBox3.Value = "LABORATUVAR TAHLİLLERİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "SOLUNUM FONKSİYON TESTİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "ODYOMETRİ TESTİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "EKG" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "RÖNTGEN" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
     If ComboBox3.Value = "İŞE GİRİŞ MUAYENESİ" Then
    On Error Resume Next
    TextBox11 = KDV8 + Replace(TextBox13 * 0.08, ".", ",")
    
    If Err <> 0 Then TextBox11 = Empty
    End If
    
    If ComboBox3.Value = "ORTAM ÖLÇÜMÜ" Then
    On Error Resume Next
    TextBox10 = KDV8 + Replace(TextBox13 * 0.18, ".", ",")
    
    If Err <> 0 Then TextBox10 = Empty
    End If
   
    If ComboBox3.Value = "RİSK DEĞERLENDİRME RAPORU" Then
    On Error Resume Next
    TextBox10 = KDV18 + Replace(TextBox13 * 0.18, ".", ",")
    
    If Err <> 0 Then TextBox10 = Empty
    End If
End Sub

Hocam dediğiniz gibi yaptım ama hem toplamayı yapmadı yine hem de değişik bir hata verdi. Dosyayı yüklüyorum hata veren şekilde. Bir de kdvlerde virgüllü değerlerde hata veriyor ya da direk 0 gibi değerler oluşturuyor kendiliğinden hocam
 

Ekli dosyalar

bu konuda desteklerinizi bekliyorum arkadaşlarım. programı ilerletemiyorum takıldım kaldım
 
Textbox8 den itibaren Açıklamaların karşısına gizli iki textbox ekleyip birine KDV oranını diğerine KDV yi yazdırın. KDV oranı 8 olanların toplamını KDV8 toplamına, KDV 18 lerin toplamını da KDV 18 lerin toplamına ekleyin. Yoksa veriyi her değiştirmede KDV ekleme yapacaktır.Örneğin 100 yazdınız diyelim. 1 kdv 0,018 10=1,8 olması gerekirken 1,98 olacak,100 yazınca da 18 olması gerekirken 19,98 gibi bir değer çıkar.
 
Textbox8 den itibaren Açıklamaların karşısına gizli iki textbox ekleyip birine KDV oranını diğerine KDV yi yazdırın. KDV oranı 8 olanların toplamını KDV8 toplamına, KDV 18 lerin toplamını da KDV 18 lerin toplamına ekleyin. Yoksa veriyi her değiştirmede KDV ekleme yapacaktır.Örneğin 100 yazdınız diyelim. 1 kdv 0,018 10=1,8 olması gerekirken 1,98 olacak,100 yazınca da 18 olması gerekirken 19,98 gibi bir değer çıkar.

hocam anlayamadım kusura bakmayın. örnek yapabilir misiniz dosyaya
 
Geri
Üst