• Merhaba Ziyaretçi,
    Microsoft 365 Uygulamaları ile ilgili yeni haberler, dikkat çekici konular, ilgi ile takip edeceğiniz yazılar için.

    Abone Olun
  • ESTE - Microsoft Office Eğitimleri

    Yeni yıl Microsoft Office Eğitim planlarınız için bütçenizi oluşturmadan önce ESTE eğitim kalitesi ile tanışın. 🙌
    Kullanıcıların ihtiyacı olan yazılı materyal, dosya ve video kaynağı desteğimiz ile tüm ofis çalışanlarının iş süreçlerini rahatlatacak eğitimler planlayın. 🎯
    Microsoft Office eğitimlerimiz hakkında detaylı bilgi için bize ulaşın.

    👉 Microsoft Office Eğitim Talebi

Yardım Listbox Toplama Hatası

TURKSEMPEROR

Yeni Üye
Katılım
11 Eyl 2019
Mesajlar
6
En iyi yanıt
0
Puanları
1
Yaş
31
Konum
Samsun
Ad Soyad
Emre SAĞLAM
Merhabalar;

Excel userform u açtığım zaman resim 2'deki gibi "Listbox1" e "Mesaidata" sayfasındaki veriler geliyor.
Süzme işlemi yaparken "ComboBox2" den isim seçiyorum ve "CommandButton38" e bastığım zaman o isimle ilgili bütün verileri süzüyor ve toplamlarını,
"textbox13"-"textbox15"-"textbox16"-"textbox17"-"textbox18"-"textbox19"-"textbox20" e alıyor, fakat "CommandButton10" tıkladığım zaman yani tüm listeyi gör
tıkladığım zaman bütün veriler ancak toplamları aşağıda yazmıyor, sadece süzme işlemi yaptığım zaman toplamlarını alıyor, süzme işlemi yapmadanda toplamlarını
almam gerek,
Birde Listede kaydedilen veri en aşağaya gidiyor bunu terse çevirebilirmiyiz yani en son kaydedilen en üste gelse takibi daha kolay olacak benim için ,aşağıya kodlarını atıyorum yardımcı olabilecek var mı ? yardımlarınızı bekliyorum. şimdiden teşekkürler.

CommandButton38(Süzme İşlemi)

Kod:
Dim i As Long, z As Object
If Me.ComboBox2.Text = "" Then Exit Sub
ComboBox3.Clear
ComboBox4.Clear
ComboBox5.Clear


deger = Array("", mesai, trh, saat, mazeret, uctrs, rapor, yillik, resmi)
For txt = 13 To 20
Me.Controls("TextBox" & txt) = ""
des = des + 1
deger(des) = Empty
Next txt
des = 0

Dim dizi()
With Worksheets("MESAİDATA")
For sat = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
If .Cells(sat, 2) Like Me.ComboBox2.Text & "*" Then
Say = Say + 1
ReDim Preserve dizi(1 To 12, 1 To Say)
For sut = 1 To 12
    dizi(sut, Say) = .Cells(sat, sut)
   
    If sut = 3 Then mesai = mesai + .Cells(sat, sut)
    If sut = 4 Then trh = trh + .Cells(sat, sut)
    If sut = 5 Then saat = saat + .Cells(sat, sut)
    If sut = 6 Then mazeret = mazeret + .Cells(sat, sut)
    If sut = 7 Then uctrs = uctrs + .Cells(sat, sut)
    If sut = 8 Then rapor = rapor + .Cells(sat, sut)
    If sut = 9 Then yillik = yillik + .Cells(sat, sut)
    If sut = 10 Then resmi = resmi + .Cells(sat, sut)

Next sut
End If
Next sat
End With
'bütün Tarihi Süz
With Me.ListBox1
.RowSource = vbNullString
If IsEmpty(Say) Then Exit Sub
.ColumnCount = UBound(dizi())
.Column = dizi
End With
Set z = CreateObject("scripting.dictionary")
For i = 0 To ListBox1.ListCount - 1
    If Not z.exists(ListBox1.List(i, 3)) Then
        z.Add ListBox1.List(i, 3), Nothing
    End If
    ListBox1.List(i, 3) = Format(ListBox1.List(i, 3), "dd.mm.yyyy")
Next i
If z.Count > 0 Then ComboBox3.List = Application.Transpose(z.keys)
deger = Array("", mesai, trhh, saat, mazeret, uctrs, rapor, yillik, resmi)
For txt = 13 To 20
des = des + 1
Me.Controls("TextBox" & txt) = deger(des)
Next txt

'sadece Yıl Süz
With Me.ListBox1
.RowSource = vbNullString
If IsEmpty(Say) Then Exit Sub
.ColumnCount = UBound(dizi())
.Column = dizi
End With
Set z = CreateObject("scripting.dictionary")
For i = 0 To ListBox1.ListCount - 1
    If Not z.exists(ListBox1.List(i, 3)) Then
        z.Add ListBox1.List(i, 3), Nothing
    End If
    ListBox1.List(i, 3) = Format(ListBox1.List(i, 3), "dd.mm.yyyy")
Next i
If z.Count > 0 Then ComboBox4.List = Application.Transpose(z.keys)
deger = Array("", mesai, trhh, saat, mazeret, uctrs, rapor, yillik, resmi)
For txt = 13 To 20
des = des + 1

Next txt

'sadece AY Süz
With Me.ListBox1
.RowSource = vbNullString
If IsEmpty(Say) Then Exit Sub
.ColumnCount = UBound(dizi())
.Column = dizi
End With
Set z = CreateObject("scripting.dictionary")
For i = 0 To ListBox1.ListCount - 1
    If Not z.exists(ListBox1.List(i, 3)) Then
        z.Add ListBox1.List(i, 3), Nothing
    End If
    ListBox1.List(i, 3) = Format(ListBox1.List(i, 3), "dd.mm.yyyy")
Next i
If z.Count > 0 Then ComboBox5.List = Application.Transpose(z.keys)
deger = Array("", mesai, trhh, saat, mazeret, uctrs, rapor, yillik, resmi)
For txt = 13 To 20
des = des + 1

Next txt
ListBox1(MesaiData daki verileri Listeliyor)
Kod:
Private Sub ListBox1_Click()

On Error Resume Next
TextBox1 = ListBox1.List(ListBox1.ListIndex, 0) 'ListBox'a tıkladığımızda değerleri textbox'lara alıyoruz.
ComboBox2 = ListBox1.List(ListBox1.ListIndex, 1)
TextBox3 = ListBox1.List(ListBox1.ListIndex, 2)
TextBox4 = ListBox1.List(ListBox1.ListIndex, 3)
TextBox5 = ListBox1.List(ListBox1.ListIndex, 4)
TextBox6 = ListBox1.List(ListBox1.ListIndex, 5)
TextBox7 = ListBox1.List(ListBox1.ListIndex, 6)
TextBox8 = ListBox1.List(ListBox1.ListIndex, 7)
TextBox9 = ListBox1.List(ListBox1.ListIndex, 8)
TextBox10 = ListBox1.List(ListBox1.ListIndex, 9)
ComboBox1 = ListBox1.List(ListBox1.ListIndex, 10)
TextBox12 = ListBox1.List(ListBox1.ListIndex, 11)
aranan = TextBox1.Value
    Range("A:A").Find(aranan).Select
    degistir_satır = ActiveCell.Row
   

End Sub
CommandButton10(Tümünü Gör )
Kod:
Private Sub CommandButton10_Click()
            TextBox13.Value = ""
            TextBox14.Value = ""
            TextBox15.Value = ""
            TextBox16.Value = ""
            TextBox17.Value = ""
            TextBox18.Value = ""
            TextBox19.Value = ""
            TextBox20.Value = ""
           
           
Call UserForm_Initialize
End Sub
ComboBox2(Personel İsimini buluyor)
Kod:
On Error GoTo Bitir
'Site seçildiğinde yapılacak işlemler
Dim BUL As Range
Set BUL = Sheets("PERSONELDATA").Columns(2).Find(what:=ComboBox2)
ComboBox1.Text = BUL.Offset(0, 10).Value

Bitir:
toplama.PNG

tümünüsüz.PNG
 

TURKSEMPEROR

Yeni Üye
Katılım
11 Eyl 2019
Mesajlar
6
En iyi yanıt
0
Puanları
1
Yaş
31
Konum
Samsun
Ad Soyad
Emre SAĞLAM
toplama işlemini halletim arkadaşlar sadece listboxdaki verileri en son kaydedilen en üste gelecek onu halledemedim . yardımlarınızı bekliyorum:)
 
Üst Alt