• DİKKAT

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

Soru textbox topla

sirkülasyon

Altın Üye
Katılım
10 Temmuz 2012
Mesajlar
2,543
Excel Vers. ve Dili
2021 LTSC TR
Kod:
For B = 1 To 9 Step 8
If IsNumeric(Me.Controls("Textbox" & B).Text) = True Then
N = N + CDbl(Controls("Textbox" & B).Text)
Me.Controls("Textbox" & B) = Format(Me.Controls("Textbox" & B), "#,##0.00")
End If
Next
TextBox18.Text = Format(N, "#,##0.00")

yukardaki kod ile sadece Textbox9 değerini topluyor.
Formatı bozmadan ve step vermeden TextBox1 ve TextBox9 nasıl toplatabilirim?
Yardımcı olabilirseniz sevinirim
 
Merhaba,
Burada döngü sadece 1 ve 9 değerini üreteceği için Textbox1 ve Textbox9 değeri toplama alıyordur. Textbox1 İf şartındaki numeric olmayan bir değer olabilir mi? Bu yüzden es geçiyor olabilir.
 
Ustam kodda sıkıntı yok ise hücrede ki rakamları tekrar kontrol edeyim.
Yardımınız için teşekkür ederim. Sağ olun
 
Aşağıdaki kodu deneyiniz.
Kod:
If IsNumeric(Me.Controls("Textbox" & 1).Text) = True Then
N = CDbl(Me.Controls("Textbox" & 1).Text)
Me.Controls("Textbox" & 1).Text = Format(N, "#,##0.00")
End If

If IsNumeric(Me.Controls("Textbox" & 9).Text) = True Then
M = CDbl(Me.Controls("Textbox" & 9).Text)
Me.Controls("Textbox" & 9).Text = Format(M, "#,##0.00")
End If

TextBox18.Text = Format(M + N, "#,##0.00")
 
Geri
Üst