PC Review


Reply
Thread Tools Rate Thread

Detecting cursor position in a text box...

 
 
=?Utf-8?B?SmltIEJ1cmtlIGluIE5vdmk=?=
Guest
Posts: n/a
 
      5th May 2006
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
 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      5th May 2006
Unless I am mistaken, just use SelStart without assigning a value.

Dim lngPosition as Long

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


"Jim Burke in Novi" <(E-Mail Removed)> wrote in
message news:40B13803-9ACD-424B-B227-(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?SmltIEJ1cmtlIGluIE5vdmk=?=
Guest
Posts: n/a
 
      5th May 2006
Thanks. That's simple enough!

"John Spencer" wrote:

> Unless I am mistaken, just use SelStart without assigning a value.
>
> Dim lngPosition as Long
>
> lngPosition = Me.TextboxControl.SelStart
> MsgBox "In position " & lngPosition
>
>
> "Jim Burke in Novi" <(E-Mail Removed)> wrote in
> message news:40B13803-9ACD-424B-B227-(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Text to the cursor position of a Text box from another cont scott56hannah Microsoft Excel Programming 2 19th Jun 2008 02:06 PM
Cursor position in text box JPSutor Microsoft VB .NET 2 28th Mar 2007 11:15 PM
Detecting I-beam cursor position in slidesorter Martin Stender Microsoft Powerpoint 3 11th Nov 2005 04:45 PM
text cursor position Ilann Microsoft C# .NET 1 28th Oct 2004 05:18 PM
add text at cursor position Simon Sunke Microsoft Outlook VBA Programming 3 27th Feb 2004 07:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 AM.