That is the way the control sorts numbers - it sees it as text. You can overcome that by sorting the array (with a simple sort routine) and then writing it to the control. Otherwise you might sort the recordset with the SQL and then write to it (if you are reading from a database. PK Odendaal
pko@942.co.za
When I put FileSize into the ListView subitem, I right justify with leading spaces.
' Assuming 8 positions for size.
' Put 8 spaces on the left then take the rightmost 8 characters.
lstv.Items(idxSize) = Right$(Space(8) & CStr(marySize(I)), 8)
Now it will sort properly and look better in the list.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.