Post by Brandon Parker on May 19, 2019 21:57:09 GMT -5
It works for me ...
Are you sure that the next one down in the ListBox is not being removed? SelectionIndex starts at 1 for the 0'th element of the array; Zero is reserved to be returned when there is nothing selected. Thus the relationship between SelectionIndex and the Array Element index is off by one with SelectionIndex being higher.
So, if you have values 0 - 9 being shown in a ListBox and you select the value 2 to be deleted the SelectionIndex variable will hold the value of 3 when it returns and thus you will need to subtract one from it if you are using Zero based arrays (which one should always being doing ... )
Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM