You can't. When the user clicks the button, the focus moves to the button,
and so the insertion point is lost.
You can use a toolbar button to insert the character into
Screen.ActiveControl, and use SelStart and SelLength to work out where the
insertion point is and what is currently selected.
Van, that's fine if he wants the character at the end.
What bothers me is that people who ask this q. usually expect the character
to insert whereever the cursor is in the field, and that's not going to
happen with a command button.
I thought that I could use this, but I can't. There has
to be a way to input the character where the cursor is.
Is there another way?
Thank you for reading this
RK
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.