• DİKKAT

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

textbox ta çarpma işlemi

Katılım
3 Aralık 2007
Mesajlar
188
Excel Vers. ve Dili
ofice2010 Türkçe
textbox1 deki adetle textbox2 deki rakamı çarpıp textbox3 yazmasını istiyorum ama beceremedim.
 
arkadaşlar biliyorum çok beceriksiz biriyim ama lütfen yardım edin
 
Aşağıdaki kodlar bir commandbutona atanmıştır.:cool:
Kod:
Private Sub CommandButton1_Click()
TextBox3.Value = Empty
If IsNumeric(TextBox1.Value) And IsNumeric(TextBox2.Value) Then
    TextBox3.Value = CDbl(TextBox1.Value) * CDbl(TextBox2.Value)
End If
End Sub
 
sevgili arion2 kardeşim
commandbutona aktarmadan olmazmı acaba.? direk işlem yapmazmıyım.?
 
Aşağıdaki gibi deneyiniz.
Kod:
Private Sub TextBox1_Change()
Me.TextBox3 = Me.TextBox1
End Sub

Private Sub TextBox2_Change()
On Error Resume Next
TextBox3 = Val(Me.TextBox1) * (Me.TextBox2)
End Sub
 
Kod:
Private Sub TextBox1_Change()
On Error Resume Next
    TextBox3 = TextBox1 * TextBox2
    
    If Err <> 0 Then TextBox3 = Empty
End Sub
Private Sub TextBox2_Change()
On Error Resume Next
    TextBox3 = TextBox1 * TextBox2
    
    If Err <> 0 Then TextBox3 = Empty
End Sub
 
arkada&#351;lar&#305;m &#231;ok te&#351;ekk&#252;rler ederim bir de rakam&#305; d&#252;z yaz&#305; 1.000,00 gibi olurmu acaba
 
Kod:
Private Sub TextBox1_Change()
On Error Resume Next
    TextBox3 = FormatNumber(TextBox1 * TextBox2)
    
    If Err <> 0 Then TextBox3 = Empty
End Sub
 
Private Sub TextBox2_Change()
On Error Resume Next
    TextBox3 = FormatNumber(TextBox1 * TextBox2)
    
    If Err <> 0 Then TextBox3 = Empty
End Sub
 
arkada&#351;lar&#305;m bu pazar g&#252;n&#252; yard&#305;mlar&#305;n&#305;zdan dolay&#305; te&#351;ekk&#252;rler ederim. ba&#351;ka bir sayfada textbox larda farkl&#305; bir &#231;al&#305;&#351;ma kitab&#305;ndan d&#252;&#351;ey ara ile bilgi getirebilirmiyim diye sormu&#351;tum. 2.xls kitab&#305;mdaki userform &#252;zerindeki textbox1 e say&#305; veya harf girdi&#287;imde 1.xls kitab&#305;mda a,b,c, s&#252;t&#252;nlar&#305;ndaki bilgilerimi textbox2,textbox3,textbox4 e yazd&#305;rmam gerekiyor. fakat bu i&#351;lem bir&#231;ok textbox &#252;zerinde olmas&#305; gerekiyor. yard&#305;m edermisiniz.
 
Geri
Üst