Listbox - UnsupportedFormatException was not handled

I have a one column listbox1 filled with a number of items.

When I click on one of the items, listbox2 is filled with the selected item.

However, if I click on an empty portion of listbox1 I get “UnsupportedFormatException was not handled”

If you share your code someone will figure it out, without the code is hard to guess what is going on.

If you going to share some lines of code, you can use the


tags to format it.

I am going to bet that in one of the listbox events that passes in row and column
you are attempting to do something to the Listbox(row,column) where in fact one or both of those values are outside the content bounds of the listbox… you should always compare ROW to LISTCOUNT-1 before attempting an operation with a cell

As say before, you are trying to copy a non existent Row (non existend Cells of a non existent Row)… in Listbox1.Change.

Check the clikced Row # and exit if it does not exists (the ListIndex is set to -1).