• DİKKAT

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

Texbox çoklu işlem

Katılım
6 Kasım 2006
Mesajlar
176
Excel Vers. ve Dili
türkçe
Private Sub TextBox15_Change() 't15=(t12+t13)*t14*1

L = TextBox12
M = TextBox13
n = TextBox14
If TextBox12 = "" Then L = 0
If TextBox13 = "" Then M = 0
If TextBox14 = "" Then n = 0
TextBox15 = Replace((L + M) * n * 1, ".", ",")

End Sub


hata alıyorum yardımcı olurmusunuz.
 
Ne hatası alıyorsunuz ?
 
run-time error '13' type mismatch
tam sayı olmadığından kaynaklandığını düşünüyorum acaba doğrumu nasıl düzelmem gerekiyor.


Kod:
Private Sub TextBox11_Change() 't12=t10*t11*4*12*t9
ı = TextBox9
j = TextBox10
k = TextBox11
If TextBox9 = "" Then ı = 0
If TextBox10 = "" Then j = 0
If TextBox11 = "" Then k = 0

'TextBox12 = Replace(a + b + c + d + e + f + g + h + ı + j + k, ".", ",")
TextBox12 = Replace(j * k * 4 * 1.2 * ı, ".", ",")
End Sub
Private Sub TextBox12_Change() 't13=(t3*t4*2+t5*t6*2+t7*t8*2)t9*1.2
c = TextBox3
d = TextBox4
e = TextBox5
f = TextBox6
g = TextBox7
h = TextBox8
ı = TextBox9
If TextBox3 = "" Then c = 0
If TextBox4 = "" Then d = 0
If TextBox5 = "" Then e = 0
If TextBox6 = "" Then f = 0
If TextBox7 = "" Then g = 0
If TextBox8 = "" Then h = 0
If TextBox9 = "" Then ı = 0
TextBox13 = Replace((c * d * 2 + e * f * 2 + g * h * 2) * ı * 1.2, ".", ",")
End Sub
Private Sub TextBox15_Change() 't15=(t12+t13)*t14*1
L = TextBox12
M = TextBox13
n = TextBox14
If TextBox12 = "" Then L = 0
If TextBox13 = "" Then M = 0
If TextBox14 = "" Then n = 0
TextBox15 = Replace((L + M) * n * 1, ".", ",")
End Sub
 
Son düzenleme:
Merhaba,

Örnek dosya olmadığı için tahmin yoluyla çözüm öneriyorum. Bu tarz problemlerde genellikle matematiksel işlemler sonunda istenmeyen sonuçlar çıkınca hata değeri oluşabilir.

Bu sebeple "Replace" komutu ile yaptığınız işlemden önce bir mesaj kutusu ile sonucu ekrana getirip kontrol edebilirsiniz. Bu şekilde neyin hataya sebep olduğunu gözlemleyebilirsiniz. Bunun için kodları F8 tuşu ile adım adım çalıştırmalısınız.
 
dosyayı ekledim
Kod:
TextBox15 = Replace((L + M) * n * 1, ".", ",")
hata aldığım sıra (L+M ) de sorun toplamıyor.
 

Ekli dosyalar

Son düzenleme:
Kod:
Private Sub TextBox11_Change() 't12=t10*t11*4*12*t9
ı = Replace(TextBox9.Value, ".", ",")
j = Replace(TextBox10.Value, ".", ",")
k = Replace(TextBox11.Value, ".", ",")
If TextBox9.Value = "" Then ı = 0
If TextBox10.Value = "" Then j = 0
If TextBox11.Value = "" Then k = 0
TextBox12 = FormatNumber(j * k * 4 * 1.2 * ı, 2)
End Sub
Private Sub TextBox12_Change() 't13=(t3*t4*2+t5*t6*2+t7*t8*2)t9*1.2

c = Replace(TextBox3.Value, ".", ",")
d = Replace(TextBox4.Value, ".", ",")
e = Replace(TextBox5.Value, ".", ",")
f = Replace(TextBox6.Value, ".", ",")
g = Replace(TextBox7.Value, ".", ",")
h = Replace(TextBox8.Value, ".", ",")
ı = Replace(TextBox9.Value, ".", ",")
If TextBox3.Value = "" Then c = 0
If TextBox4.Value = "" Then d = 0
If TextBox5.Value = "" Then e = 0
If TextBox6.Value = "" Then f = 0
If TextBox7.Value = "" Then g = 0
If TextBox8.Value = "" Then h = 0
If TextBox9.Value = "" Then ı = 0
TextBox13 = FormatNumber((c * d * 2 + e * f * 2 + g * h * 2) * ı * 1.2, 2)
End Sub
Private Sub TextBox15_Change() 't15=(t12+t13)*t14
L = Replace(TextBox12.Value, ".", ",") * 1
M = Replace(TextBox13.Value, ".", ",") * 1
n = Replace(TextBox14.Value, ".", ",") * 1
If TextBox12.Value = "" Then L = 0
If TextBox13.Value = "" Then M = 0
If TextBox14.Value = "" Then n = 0
TextBox15.Value = FormatNumber((L + M) * n, 2)
End Sub
Private Sub TextBox24_Change()
o = Replace(TextBox15.Value, ".", ",")
p = Replace(TextBox16.Value, ".", ",")
q = Replace(TextBox17.Value, ".", ",")
r = Replace(TextBox18.Value, ".", ",")
s = Replace(TextBox19.Value, ".", ",")
t = Replace(TextBox20.Value, ".", ",")
u = Replace(TextBox21.Value, ".", ",")
v = Replace(TextBox22.Value, ".", ",")
w = Replace(TextBox23.Value, ".", ",")
If TextBox15.Value = "" Then o = 0
If TextBox16.Value = "" Then p = 0
If TextBox17.Value = "" Then q = 0
If TextBox18.Value = "" Then r = 0
If TextBox19.Value = "" Then s = 0
If TextBox20.Value = "" Then t = 0
If TextBox21.Value = "" Then u = 0
If TextBox22.Value = "" Then v = 0
If TextBox23.Value = "" Then w = 0
TextBox24.Value = FormatNumber(o + p + q + r + s + t + u + v + w, 2)
End Sub
texbox 24 te Run-time error '13' Type mismatch hatası veriyor.
 

Ekli dosyalar

konu hakkında yardım edebilecek arkadaşlar lütfen bir bakarmısınız.
 
Merhaba,

Replace yerine "Val" fonk. kullanın. Yani;

Kod:
o = Val(TextBox15.Value)
 
Zeki bey sanırım val ile olacak teşekkürler.
 
Son düzenleme:
texbox ta yüzde hesaplama

Kod:
Private Sub ListView1_BeforeLabelEdit(Cancel As Integer)

End Sub

Private Sub TextBox11_Change() 't12=t10*t11*4*12*t9
ı = Val(TextBox9.Value)
j = Val(TextBox10.Value)
k = Val(TextBox11.Value)
If TextBox9.Value = "" Then ı = 0
If TextBox10.Value = "" Then j = 0
If TextBox11.Value = "" Then k = 0
TextBox12 = (j * k * 4 * 1.2 * ı)
End Sub
Private Sub TextBox12_Change() 't13=(t3*t4*2+t5*t6*2+t7*t8*2)t9*1.2

c = Val(TextBox3.Value)
d = Val(TextBox4.Value)
e = Val(TextBox5.Value)
f = Val(TextBox6.Value)
g = Val(TextBox7.Value)
h = Val(TextBox8.Value)
ı = Val(TextBox9.Value)
If TextBox3.Value = "" Then c = 0
If TextBox4.Value = "" Then d = 0
If TextBox5.Value = "" Then e = 0
If TextBox6.Value = "" Then f = 0
If TextBox7.Value = "" Then g = 0
If TextBox8.Value = "" Then h = 0
If TextBox9.Value = "" Then ı = 0
TextBox13 = (c * d * 2 + e * f * 2 + g * h * 2) * ı * 1.2
End Sub
Private Sub TextBox15_Change() 't15=(t12+t13)*t14
L = Val(TextBox12.Value)
M = Val(TextBox13.Value)
n = Val(TextBox14.Value)
If TextBox12.Value = "" Then L = 0
If TextBox13.Value = "" Then M = 0
If TextBox14.Value = "" Then n = 0

TextBox15.Value = ((L + M) * n * 1)
End Sub

Private Sub TextBox24_Change()

o = Val(TextBox15.Value)
p = Val(TextBox16.Value)
q = Val(TextBox17.Value)
r = Val(TextBox18.Value)
s = Val(TextBox19.Value)
t = Val(TextBox20.Value)
u = Val(TextBox21.Value)
v = Val(TextBox22.Value)
w = Val(TextBox23.Value)
If TextBox15.Value = "" Then o = 0
If TextBox16.Value = "" Then p = 0
If TextBox17.Value = "" Then q = 0
If TextBox18.Value = "" Then r = 0
If TextBox19.Value = "" Then s = 0
If TextBox20.Value = "" Then t = 0
If TextBox21.Value = "" Then u = 0
If TextBox22.Value = "" Then v = 0
If TextBox23.Value = "" Then w = 0
 TextBox24.Value = (o + p + q + r + s + t + u + v + w)
End Sub

Private Sub TextBox25_Change()
'25=24*36 yzdesi
x = Val(TextBox24.Value)
ao = Val(TextBox36.Value)
If TextBox24.Value = "" Then x = 0
If TextBox36.Value = "" Then ao = 0
TextBox25.Value = (x * ao) / 100 + x
End Sub

Private Sub TextBox26_Change()
'26=25*37 yzdesi
y = Val(TextBox25.Value)
ap = Val(TextBox37.Value)
If TextBox25.Value = "" Then y = 0
If TextBox37.Value = "" Then ap = 0
TextBox25.Value = (y * ap) / 100 + x
End Sub
dediğiniz şekilde oldu bukezde texbox26 işlemi yapmiyor burada takıldım kaldım yardımcı olabilirmisiniz.
 

Ekli dosyalar

Son düzenleme:
Kod:
Private Sub TextBox26_Change()
y = Val(TextBox25.Value)
ap = Val(TextBox37.Value)
z = Val(TextBox26.Value)
If TextBox25.Value = "" Then y = 0
If TextBox37.Value = "" Then ap = 0
If TextBox26.Value = "" Then z = 0
TextBox26.Value = (y * ap) / 100 + y
End Sub
buymuş kod
 
Geri
Üst