Detecting cursor position in a text box...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a simple way to determine where the cursor is in a text box after
someone clicks on it (e.g. in position 9 after the 8th character)? Haven't
been able to find this anywhere. I know how to use SelStart to SET the
position, but not how to GET the position.

Jim Burke
 
Unless I am mistaken, just use SelStart without assigning a value.

Dim lngPosition as Long

lngPosition = Me.TextboxControl.SelStart
MsgBox "In position " & lngPosition
 
Thanks. That's simple enough!

John Spencer said:
Unless I am mistaken, just use SelStart without assigning a value.

Dim lngPosition as Long

lngPosition = Me.TextboxControl.SelStart
MsgBox "In position " & lngPosition
 
Back
Top