اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

فرز البيانات في الليست بوكس


الردود الموصى بها

السلام عليكم

لفرز البيانات في الليست بوكس متعدد الأعمدة نستخدم هذا الكود

هنا الفرز للعمود رقم ( 4 )

 Dim i As Long
    Dim j As Long
    Dim sTemp As String
    Dim sTemp2 As String
    Dim sTemp3 As String
    Dim sTemp4 As String
    Dim sTemp5 As String
    Dim LbList As Variant

    LbList = Me.ListBox1.List
    For i = LBound(LbList, 1) To UBound(LbList, 1)
        For j = i + 1 To UBound(LbList, 1)
            '--------------------------------------------------------------------
    ' C,a'E^N~E^i'E` E`a"C,A' U'a'i` C,a'U'a~?I" C,a'E"C,a"i`

            If LbList(i, 3) > LbList(j, 3) Then

                sTemp = LbList(i, 0)
                LbList(i, 0) = LbList(j, 0)
                LbList(j, 0) = sTemp

                sTemp2 = LbList(i, 1)
                LbList(i, 1) = LbList(j, 1)
                LbList(j, 1) = sTemp2

                 sTemp3 = LbList(i, 2)
                LbList(i, 2) = LbList(j, 2)
                LbList(j, 2) = sTemp3

                  sTemp4 = LbList(i, 3)
                LbList(i, 3) = LbList(j, 3)
                LbList(j, 3) = sTemp4

                 sTemp5 = LbList(i, 4)
                LbList(i, 4) = LbList(j, 4)
                LbList(j, 4) = sTemp5

                sTemp6 = LbList(i, 5)
                LbList(i, 5) = LbList(j, 5)
                LbList(j, 5) = sTemp6
            End If
        Next j
    Next i

    Me.ListBox1.Clear

    Me.ListBox1.List = LbList

المشكلة اذا كانت البيانات في العمود المفروز = تاريخ ( منسق على شكل يوم \ شهر \ سنة )   - لان الفرز سيتم حسب اليوم فقط

السؤال : كيف يمكن جعل الفرز حسب اليوم ثم الشهر ثم السنة

رابط هذا التعليق
شارك

أخي الكريم نايف

الملف المرفق يسهل على الأخوة الأعضاء تقديم المساعدة ..بشكل أفضل وأسرع

تقبل تحياتي

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information