Ill test out that code and see if i can adapt it into my project. thanks
that still beats doing a bubble sort involving 8 listboxes. (speed would be horrible too i think.)
Another issue I've encountered is with the zip codes....for some.
Excel seems to get rid of leading 0s in the columns..which im pulling the data from an excel sheet that is updated some what regularly by someone else.
So my problem is any zip code that starts with a 0 ( eg. 07152) will show in my program as 7152.
psuedo code i came up with would be something like this to address the problem.
not sure if format function can be used like this though.Code:If Format(lstZip.List(i), "####") = True Then lstZip.AddItem Format(oXLSheet.Cells(i, 22), "0####") Else lstZip.AddItem oXLSheet.Cells(i, 22) End If
My other option would be to conver the excel sheet to a database and just manually edit those zipcodes that have lost their leading 0.![]()




Reply With Quote