Hi all, need some help ' cause I just can't figure this one out. I am
trying to find which char the cursor is located at within an text box using
the arrow keys.
Thanks
TimB
Jan Hyde - 28 Sep 2004 15:21 GMT
"Tim Badger" <tbadger@adlandsys.com>'s wild thoughts were
released on Tue, 28 Sep 2004 08:08:10 -0400 bearing the
following fruit:
>Hi all, need some help ' cause I just can't figure this one out. I am
>trying to find which char the cursor is located at within an text box using
>the arrow keys.
Take a look at SelStart and SelLength
Jan Hyde (VB MVP)

Signature
Sinuses run in our family (Richard Lederer)
[Abolish the TV License - http://www.tvlicensing.biz/]
Rick Rothstein - 28 Sep 2004 16:01 GMT
> Hi all, need some help ' cause I just can't figure this
> one out. I am trying to find which char the cursor is
> located at within an text box using the arrow keys.
If your TextBox is named Text1, then
CharAfterCursor = Mid$(Text1.Text, Text1.SelStart + 1, 1)
The +1 is there because the SelStart property is zero-based and
character positions in a string are 1-based.
Rick - MVP