Cursor position

I

il barbi

I need some VBA function giving the position of the cursor
in a text control, namely the order number of the character
in the string on which the cursor is currently positioned
il barbi
 
D

Dirk Goldgar

il barbi said:
I need some VBA function giving the position of the cursor
in a text control, namely the order number of the character
in the string on which the cursor is currently positioned
il barbi

If control txtMyTextbox has the focus, then

Me!txtMyTextbox.SelStart

returns the position of the text caret.
 

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.

Ask a Question

Top