• DİKKAT

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

Listbox verileri tarihe göre sıralama

Katılım
4 Eylül 2020
Mesajlar
394
Excel Vers. ve Dili
Excel 2016
Merhabalar ekteki dosyada listbox 2 tarih arası veri alabiliyorum . Fakat gelen verileri listbox başlangıç tarihine göre sıralama yapamadım. Sayfada sıralama olmasını istemiyorum . diğer sorunda textbox boş olunca hata veriyor çözümlerinizi bekliyorum teşekkür ederim
 

Ekli dosyalar

Merhaba,
Sıralama için aşağıdaki kod bloğunu deneyiniz...
Kod:
Dim a As Integer, b As Integer, c As Byte, x As String
For a = LBound(ListBox1.List) To UBound(ListBox1.List) - 1
    For b = a + 1 To UBound(ListBox1.List)
        If CDate(ListBox1.List(a, 5)) > CDate(ListBox1.List(b, 5)) Then
            For c = LBound(ListBox1.List, 2) To UBound(ListBox1.List, 2)
                x = IIf(IsNull(ListBox1.List(a, c)), "", ListBox1.List(a, c))
                ListBox1.List(a, c) = IIf(IsNull(ListBox1.List(b, c)), "", ListBox1.List(b, c))
                ListBox1.List(b, c) = x
            Next
        End If
    Next
Next
 
Hocam emeğinize sağlık çok teşekkür ederim . Departmana göre sıralamak istediğimde nasıl yapmam gerekir.
 
Rica ederim,
İyi akşamlar, iyi çalışmalar...
 
Geri
Üst