• DİKKAT

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

userform da text toplama hatası

sirkülasyon

Altın Üye
Katılım
10 Temmuz 2012
Mesajlar
2,545
Excel Vers. ve Dili
2021 LTSC TR
Ağabeylerim;
TextBox30.Value = CSng(TextBox26.Value) + CSng(TextBox27.Value) + CSng(TextBox28.Value) + CSng(TextBox29.Value)

TextBox30.Value = CLng(TextBox26.Value) + CLng(TextBox27.Value) + CLng(TextBox28.Value) + CLng(TextBox29.Value)

TextBox30.Value = CCur(TextBox26.Value) + CCur(TextBox27.Value) + CCur(TextBox28.Value) + CCur(TextBox29.Value)

TextBox30.Value = CDbl(TextBox26.Value) + CDbl(TextBox27.Value) + CDbl(TextBox28.Value) + CDbl(TextBox29.Value)

TextBox30.Value = Val(TextBox26.Value) + Val(TextBox27.Value) + Val(TextBox28.Value) + Val(TextBox29.Value)


olarak hepsini denedim ama hata vermeye devam etti.

Birde mükerrrer kayıt engelini yapamadım.

Bakabilir misiniz rica etsem
 

Ekli dosyalar

Merhaba,

Bu ifadeleri sorunsuz kullanabilmeniz için ilgili nesnelerin dolu olması gerekiyor. Bu sebeple ilk önce nesnelerin dolu olduğunu sorgulayın.

Cdbl komutu ile kullanmanızı tavsiye ederim. Bu komut ondalıklı değerleride dikkate alır.

Örnek;

Kod:
If TextBox26 = "" Then TextBox26 = 0
If TextBox27 = "" Then TextBox27 = 0
If TextBox28 = "" Then TextBox28 = 0
If TextBox29 = "" Then TextBox29 = 0
TextBox30.Value = CDbl(TextBox26.Value) + CDbl(TextBox27.Value) + CDbl(TextBox28.Value) + CDbl(TextBox29.Value)
 
Korhan Abi
Yardımınız için Teşekkür ederim. Varolasın
 
Geri
Üst