- Katılım
- 9 Aralık 2009
- Mesajlar
- 532
- Excel Vers. ve Dili
- 2007,5
fotokopi programında rapor kısmına basınca,
yanlızca o ayın verilerini veriyor ..
tümünü vermiyor ( aranan hasabın bütün dökümünü vermek yerine yanlızca son ayın verilerini döküyor neden)
verdiğim kodların neresini değiştirmem gerek, yardımcı olurmusunuz
Private Sub CommandButton3_Click()
If ComboBox6 = "" Or WorksheetFunction.CountIf(Sheets("DATA").Range("A2:A65536"), ComboBox6.Text) = 0 Then
MsgBox "Listeden Sınıf/Öğretmen Seçmedinki Gardaş Ben ne yapam", vbCritical, " *** Ercan BALKAN ***"
Exit Sub
End If
ActiveWorkbook.Sheets("RAPOR").Range("A2:F65536").ClearContents
With ActiveWorkbook.Sheets("LİSTE")
.Range("A1").AutoFilter field:=1, Criteria1:=ComboBox6.Text
If .Range("A65536").End(3).Row > 1 Then
.Range("A2:F" & .Range("A65536").End(3).Row).Copy ActiveWorkbook.Sheets("RAPOR").Range("A65536").End(3).Offset(1)
End If
.Range("A1").AutoFilter
End With
Dim tplm, bky As Long
tplm = Sheets("RAPOR").Cells(65536, "A").End(xlUp).Row + 2
bky = Sheets("RAPOR").Cells(65536, "A").End(xlUp).Row + 3
Sheets("RAPOR").Cells(tplm, "A").Value = "TOPLAMLAR :"
Sheets("RAPOR").Cells(tplm, "B").Value = Format(Now, "dd.mm.yyyy")
Sheets("RAPOR").Cells(tplm, "C").Value = Label17.Caption
Sheets("RAPOR").Cells(tplm, "D").Value = Label18.Caption
Sheets("RAPOR").Cells(tplm, "E").Value = Label19.Caption
Sheets("RAPOR").Cells(tplm, "F").Value = Label20.Caption
Sheets("RAPOR").Cells(bky, "A").Value = "BAKİYE : " & Format(Label23.Caption, "#,##0.00") & " TL."
Sheets("RAPOR").Cells(bky, "B").Value = "-"
Sheets("RAPOR").Cells(bky, "C").Value = "-"
Sheets("RAPOR").Cells(bky, "D").Value = "-"
Sheets("RAPOR").Cells(bky, "E").Value = "-"
Sheets("RAPOR").Cells(bky, "F").Value = "-"
Label82.Caption = "Rapor : " & ComboBox6.Value & ""
ListBox4.ColumnCount = 6
ListBox4.ColumnWidths = "200,100,80,80,80,80"
ListBox4.RowSource = "RAPOR!A1:F" & ActiveWorkbook.Sheets("RAPOR").Cells(65536, "A").End(xlUp).Row
MultiPage1.Value = 5
End Sub
yanlızca o ayın verilerini veriyor ..
tümünü vermiyor ( aranan hasabın bütün dökümünü vermek yerine yanlızca son ayın verilerini döküyor neden)
verdiğim kodların neresini değiştirmem gerek, yardımcı olurmusunuz
Private Sub CommandButton3_Click()
If ComboBox6 = "" Or WorksheetFunction.CountIf(Sheets("DATA").Range("A2:A65536"), ComboBox6.Text) = 0 Then
MsgBox "Listeden Sınıf/Öğretmen Seçmedinki Gardaş Ben ne yapam", vbCritical, " *** Ercan BALKAN ***"
Exit Sub
End If
ActiveWorkbook.Sheets("RAPOR").Range("A2:F65536").ClearContents
With ActiveWorkbook.Sheets("LİSTE")
.Range("A1").AutoFilter field:=1, Criteria1:=ComboBox6.Text
If .Range("A65536").End(3).Row > 1 Then
.Range("A2:F" & .Range("A65536").End(3).Row).Copy ActiveWorkbook.Sheets("RAPOR").Range("A65536").End(3).Offset(1)
End If
.Range("A1").AutoFilter
End With
Dim tplm, bky As Long
tplm = Sheets("RAPOR").Cells(65536, "A").End(xlUp).Row + 2
bky = Sheets("RAPOR").Cells(65536, "A").End(xlUp).Row + 3
Sheets("RAPOR").Cells(tplm, "A").Value = "TOPLAMLAR :"
Sheets("RAPOR").Cells(tplm, "B").Value = Format(Now, "dd.mm.yyyy")
Sheets("RAPOR").Cells(tplm, "C").Value = Label17.Caption
Sheets("RAPOR").Cells(tplm, "D").Value = Label18.Caption
Sheets("RAPOR").Cells(tplm, "E").Value = Label19.Caption
Sheets("RAPOR").Cells(tplm, "F").Value = Label20.Caption
Sheets("RAPOR").Cells(bky, "A").Value = "BAKİYE : " & Format(Label23.Caption, "#,##0.00") & " TL."
Sheets("RAPOR").Cells(bky, "B").Value = "-"
Sheets("RAPOR").Cells(bky, "C").Value = "-"
Sheets("RAPOR").Cells(bky, "D").Value = "-"
Sheets("RAPOR").Cells(bky, "E").Value = "-"
Sheets("RAPOR").Cells(bky, "F").Value = "-"
Label82.Caption = "Rapor : " & ComboBox6.Value & ""
ListBox4.ColumnCount = 6
ListBox4.ColumnWidths = "200,100,80,80,80,80"
ListBox4.RowSource = "RAPOR!A1:F" & ActiveWorkbook.Sheets("RAPOR").Cells(65536, "A").End(xlUp).Row
MultiPage1.Value = 5
End Sub
