• DİKKAT

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

Textboxlar'da çıkarma işlemi

Katılım
12 Şubat 2009
Mesajlar
451
Excel Vers. ve Dili
2010 Türkçe
Daha önceki sorumda yanlış yerde soru sorduğumu anladım,Textbox9 ve Textbox10 ile sütunda alttoplam alıyorum,Textbox11 'de aynı şekilde,Fakat toplam bakiye'yi aldığı için sonuç yanlış çıkıyor,Textbox9-Textbox10=Textboxbox11 İşlemi nasıl yapılabilir.
 

Ekli dosyalar

bunları bir dene


Kod:
Private Sub TextBox1_Change()
    If TextBox1 <> "" Then
    If Len(TextBox1) = 10 Then
    If TextBox2 <> "" Then
    Range("B8").AutoFilter Field:=2, Criteria1:=">=" & CLng(CDate(TextBox1.Value)), Operator:=xlAnd, Criteria2:="<=" & CLng(CDate(TextBox2.Value))
    Else
    Range("B8").AutoFilter Field:=2, Criteria1:=">=" & CLng(CDate(TextBox1.Value))
    End If
    End If
    Else
    Range("B8").AutoFilter Field:=2
    End If
    TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
Private Sub TextBox2_Change()
    If TextBox2 <> "" Then
    If Len(TextBox2) = 10 Then
    If TextBox1 <> "" Then
    Range("B8").AutoFilter Field:=2, Criteria1:=">=" & CLng(CDate(TextBox1.Value)), Operator:=xlAnd, Criteria2:="<=" & CLng(CDate(TextBox2.Value))
    Else
    Range("B8").AutoFilter Field:=2, Criteria1:="<=" & CLng(CDate(TextBox2.Value))
    End If
    End If
    Else
    Range("B8").AutoFilter Field:=2
    End If
TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
Private Sub TextBox3_Change()
    If TextBox3 <> "" Then
    If Len(TextBox3) = 10 Then
    If TextBox4 <> "" Then
    Range("B8").AutoFilter Field:=3, Criteria1:=">=" & CLng(CDate(TextBox3.Value)), Operator:=xlAnd, Criteria2:="<=" & CLng(CDate(TextBox4.Value))
    Else
    Range("B8").AutoFilter Field:=3, Criteria1:=">=" & CLng(CDate(TextBox3.Value))
    End If
    End If
    Else
    Range("B8").AutoFilter Field:=3
    End If
TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
Private Sub TextBox4_Change()
    If TextBox4 <> "" Then
    If Len(TextBox4) = 10 Then
    If TextBox3 <> "" Then
    Range("B8").AutoFilter Field:=3, Criteria1:=">=" & CLng(CDate(TextBox3.Value)), Operator:=xlAnd, Criteria2:="<=" & CLng(CDate(TextBox4.Value))
    Else
    Range("B8").AutoFilter Field:=3, Criteria1:="<=" & CLng(CDate(TextBox4.Value))
    End If
    End If
    Else
    Range("B8").AutoFilter Field:=3
    End If
TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
Private Sub TextBox5_Change()
    If TextBox5 <> "" Then
    Range("B8").AutoFilter Field:=4, Criteria1:=TextBox5.Value
    Else
    Range("B8").AutoFilter Field:=4
    End If
 TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
Private Sub TextBox6_Change()
    If TextBox6 <> "" Then
    Range("B8").AutoFilter Field:=5, Criteria1:=TextBox6.Value & "*"
    Else
    Range("B8").AutoFilter Field:=5
    End If
TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
Private Sub TextBox7_Change()
    If TextBox7 <> "" Then
    Range("B8").AutoFilter Field:=6, Criteria1:=TextBox7.Value & "*"
    Else
    Range("B8").AutoFilter Field:=6
    End If
TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
Private Sub TextBox8_Change()
    If TextBox8 <> "" Then
    Range("B8").AutoFilter Field:=7, Criteria1:=TextBox8.Value & "*"
    Else
    Range("B8").AutoFilter Field:=7
    End If
 TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If TextBox1 <> "" Then
    If Len(TextBox1) = 10 Then
    If TextBox2 <> "" Then
    Range("B8").AutoFilter Field:=2, Criteria1:=">=" & CLng(CDate(TextBox1.Value)), Operator:=xlAnd, Criteria2:="<=" & CLng(CDate(TextBox2.Value))
    Else
    Range("B8").AutoFilter Field:=2, Criteria1:=">=" & CLng(CDate(TextBox1.Value))
    End If
    End If
    Else
    Range("B8").AutoFilter Field:=2
    End If
    TextBox9 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]), "#,##0.00") & "YTL"
    TextBox10 = Format(WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
    TextBox11 = Format(WorksheetFunction.Subtotal(9, [I9:I65536]) - WorksheetFunction.Subtotal(9, [J9:J65536]), "#,##0.00") & "YTL"
End Sub
 
Sayın : Halit bey yardımınız için teşekkür ederim.
 
Geri
Üst