In programs I'm writing in VB5, I would like to give the User the option to remove the last character in a text box using the backspace key.

I use this code in a _keypress event procedure :
If ........... then
................
elseif ................. then
................
elseif ................. then
.................
elseif keyascii = 8 then
txtABC.text = Left$(txtABC.text, len(txtABC.text) - 1)
else
..................
end if

This does the job allright, BUT when the shortened text string is displayed in the text box, the cursor is placed at the start of the line of text, whereas I
would prefer it was placed at the end of the string where it should be.

Is there any code I can add to force the cursor to the end of string.

Warren Sugden