Listbox Edit Cell Question

I am trying to populate a cell with a period after a user types in a number(while the user is still in edit mode). I have tried many of the events but no matter what I can’t get the cell to populate with the period when the user is “editing” it. I have tried calling the following in many of the Events with no luck.

me.cell(me.listindex, 0) = me.cell(me.listindex, 0) + "."

The closest I can come to get this working is by putting the above code in the “Cell Action” Event however the period only populates after the user clicks out of the cell.

I have tried the above code in the following events of my Listbox with no luck:

  • Cell Action
  • Change
  • KeyDown
  • CellKeyDown
  • Cell Text Change
  • KeyUp

Is this possible to accomplish?

Any help is much appreciated.

It sounds like you want to look at the CellKeyDown event handler and use the ActiveCell property to get the TextField so that you can modify its Text property:

Me.ActiveCell.Text = Me.ActiveCell.Text + "."

Genius!! Thank you Paul! I had poured over the LR all day today and totally missed the relevance of that method.I just tried it and it worked perfectly! Thank you again.

Follow on to this same question.

I have ActiveCell working… and CELLACTION fires when I press ENTER while editting a cell
But NOT if I press ESCAPE to abort the edit… is there an event I am overlooking?

I set certain flags when I start the edit, and need to reset them when Edit is completed (or aborted)