Update a specific cell in a ListBox

I am trying to update a listbox cell. Here’s the background:
User adds a receipt value into a text box, presses enter and the value is added to the listbox (plus other stuff). User realizes they goofed up and entered an incorrect value. So double click on the listbox and the errant value goes away… here’s the catch. Each item is numbered sequentially. So if the delete the last item entered no problem… can fix that easy enough. BUT let’s say there are 6 entries and they are reviewing and see that entry 4 is messed up so they delete it… how do I redo the numbers?

For i As Integer = 0 To Me.LastRowIndex

intCnt = intCnt + 1
Me.CellValueAt( Me.LastColumnIndex, -1 ) = intCnt
Next

Me.CellValueAt(i, Me.LastColumnIndex) = intCnt

You’ll need .ToString at the end of that line.

Okay, this is sort of working, the wrong column is being updated and I can’t seem to figure out how to get the correct column updated. So column( 1 ) has the data I want to keep and column( 0 ) has the data I want to update. Right now, column( 1 ) is updating with the corrected counts and column( 0 ) is retaining the original counts.

Then replace LastColumnIndex with 0. You original code seemed to indicate you wanted to update the last column, rather than a particular one.

Me.CellValueAt( i, 0 ) = intCnt.ToString

Thanks again Tim!