• DİKKAT

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

listview tarih filtreleme

kemal turan

Altın Üye
Katılım
10 Haziran 2011
Mesajlar
1,677
Excel Vers. ve Dili
Excel 2010 32 bit
merhaba,
Aşağıdaki kod ile ödemeler sahifesinde tarih olan sutundan veri alıyorum.
Sorun textbox8 e
30/01/2017 yazdığımda
listview 4 ncü sutuna 30.1.2017 ile 30.11.2017 tarihli olanları da getiriyor.
İsteğim sadece 30.1.2017 tarihli olanları getirmesi
Teşekkür ederim.
Kod:
Private Sub TextBox8_Exit(ByVal Cancel As MSForms.ReturnBoolean)
On Error Resume Next
ODEMETABLOSU.TextBox8 = Format(CDate(TextBox8.Value), "dd.mm.yyyy")

ODEMETABLOSU.TextBox1 = ""
ODEMETABLOSU.TextBox2 = ""
ODEMETABLOSU.TextBox2 = ""
ODEMETABLOSU.TextBox7 = ""
Set SH = Sheets("ÖDEMELER")
Ara = Format(CDate(ODEMETABLOSU.TextBox8.Value), "dd.mm.yyyy")
    Set bulunacak = SH.Range("M:M").Find(DateValue(Ara)) 'VERİ HANGİ SÜTUNDA ARANACAK
    If Not bulunacak Is Nothing Then
       Adres = bulunacak.Address
       ODEMETABLOSU.ListView1.ListItems.Clear
       Do
            sat = bulunacak.Row
            With ODEMETABLOSU.ListView1
               .ListItems.Add , , SH.Cells(sat, 1)
                X = X + 1
                With .ListItems(X).ListSubItems
                .Add , , SH.Cells(sat, 4)
                .Add , , SH.Cells(sat, 5)
                [B].Add , , Format(CDate(SH.Cells(sat, 13).Value), "dd.mm.yyyy")[/B]
                .Add , , SH.Cells(sat, 10)
                .Add , , SH.Cells(sat, 11)
                .Add , , SH.Cells(sat, 12)
                .Add , , SH.Cells(sat, 14)
                .Add , , SH.Cells(sat, 15)
                .Add , , Format(SH.Cells(sat, 16).Value, "#,##0.00")
                .Add , , Format(SH.Cells(sat, 17).Value, "#,##0.00")
                .Add , , SH.Cells(sat, 18)
                .Add , , sat
                End With
                Call toplam
                Call toplam1
    ODEMETABLOSU.TextBox6.Value = Format(CDbl(ODEMETABLOSU.TextBox4.Value), "#,##0.00") - Format(CDbl(ODEMETABLOSU.TextBox5.Value), "#,##0.00")
ODEMETABLOSU.TextBox6.Value = Format(CDbl(ODEMETABLOSU.TextBox6.Value), "#,##0.00")
End With
            Set bulunacak = SH.Range("M:M").FindNext(bulunacak)
        Loop While Not bulunacak Is Nothing And bulunacak.Address <> Adres
    Else
        MsgBox "ARANAN GÜNDE ÖDEME YOKTUR.", vbCritical, "ARAMA SONUCUNDA HATA"
    End If
 
Merhaba
Aramayı "Tüm hücre içeriğiyle eşleştirerek" denedinizmi?
Kod:
Set bulunacak = SH.Range("M:M").Find(DateValue(Ara)[COLOR="Blue"], , , xlWhole[/COLOR]) 'VERİ HANGİ SÜTUNDA ARANACAK
 
SN.PLİNT Merhaba,
2 gündür işten ayrı olduğum için sisteme girip deneyemedim.
Sorun çözüldü , Emeğinize sağlık,
Selametle kalınız.
 
Geri
Üst