akshay2007
04-22-2010, 02:24 AM
Hello....I am a new member to this forum & also to visual basic for applications.
I was trying the code for sorting the listbox items numerically as well as alphabetically.
I tried the example from help menu to load the listbox and used a sortlistbox function that I found over the net.
I am getting the items sorted but I am getting them shifted by one place downwards.
For example if ListItem (0,0) is "zero" & ListItem (1,0) = "one", the situation before & after sorting is as follows:
BEFORE SORTING
row 0 zero
row 1 one
AFTER SORTING
row 0 EMPTY
row 1 one
row 2 zero
I need the values arranged as per alphabets but the places should not be changed.
I need help for understanding & resolving the problem...I had attached a sample worksheet herewith.
Thanks much!!
Akshay
I was trying the code for sorting the listbox items numerically as well as alphabetically.
I tried the example from help menu to load the listbox and used a sortlistbox function that I found over the net.
I am getting the items sorted but I am getting them shifted by one place downwards.
For example if ListItem (0,0) is "zero" & ListItem (1,0) = "one", the situation before & after sorting is as follows:
BEFORE SORTING
row 0 zero
row 1 one
AFTER SORTING
row 0 EMPTY
row 1 one
row 2 zero
I need the values arranged as per alphabets but the places should not be changed.
I need help for understanding & resolving the problem...I had attached a sample worksheet herewith.
Thanks much!!
Akshay