Hello,
How do I do to find where the cursor is positioned in a text box on a user form? I know that I can use EnterFieldBehavior= 1 and textbox1.selstart to find out where the selection is, or the cursor position when I type a text. However, if I have typed some text and then do a few left arrows, so that the cursor is no longer at the end of the text, the value that you get from textbox1.selstart does not give you the updated position. As soon as I make some sort of selection though, or insert more text in the middle of the current text, selstart is updated, but I don't want to enter anything. I simply would like to know: Where, in what position, is my cursor right now?
Can this be done, and if so, has anyone got a code snippet to share?
Thanks
Bengt
How do I do to find where the cursor is positioned in a text box on a user form? I know that I can use EnterFieldBehavior= 1 and textbox1.selstart to find out where the selection is, or the cursor position when I type a text. However, if I have typed some text and then do a few left arrows, so that the cursor is no longer at the end of the text, the value that you get from textbox1.selstart does not give you the updated position. As soon as I make some sort of selection though, or insert more text in the middle of the current text, selstart is updated, but I don't want to enter anything. I simply would like to know: Where, in what position, is my cursor right now?
Can this be done, and if so, has anyone got a code snippet to share?
Thanks
Bengt