Listbox cell validation

I’m trying to validate a Listbox cell entry.
(Specifically, the entry needs to be a string of any number of two digit numbers, separated by a single space.)

When a user completes an entry I check it in the Listbox.CellLostFocus event.
I trim any leading/trailing spaces, remove in between spaces and check that the numbers are two digits in length.

After displaying a MessageBox alerting the user of any needed corrections what I would like to do is programmatically “re-select” that cell for the user to make those corrections.

Is that possible?


Focus events can be tricky. You may need to use a short-period timer to get your EditCellAt call after the sequence of focus changes.

What about: