Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default find textbox insertion point

Is there a way to test for the current insertion point in a Userform
textbox--if, for example, there are 100 characters in the textbox, and the
user clicks at a point in the textbox, is there a way to find out where in
the string the user has clicked.
Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default find textbox insertion point

Look at the SelStart Property in VBA help. I think that is what you are
looking for.

"Bert" wrote:

Is there a way to test for the current insertion point in a Userform
textbox--if, for example, there are 100 characters in the textbox, and the
user clicks at a point in the textbox, is there a way to find out where in
the string the user has clicked.
Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default find textbox insertion point

Thanks. That's what I was looking for.

"JLGWhiz" wrote in message
...
Look at the SelStart Property in VBA help. I think that is what you are
looking for.

"Bert" wrote:

Is there a way to test for the current insertion point in a Userform
textbox--if, for example, there are 100 characters in the textbox, and
the
user clicks at a point in the textbox, is there a way to find out where
in
the string the user has clicked.
Thanks.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default find textbox insertion point

Private Sub TextBox1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If Button = 1 Then
With TextBox1
Me.Caption = .CurLine & " " & .SelStart & " " & .SelLength
End With
End If
End Sub

Regards,
Peter T

"Bert" wrote in message
news:F14Uj.8546$Jb2.8467@trndny03...
Is there a way to test for the current insertion point in a Userform
textbox--if, for example, there are 100 characters in the textbox, and the
user clicks at a point in the textbox, is there a way to find out where in
the string the user has clicked.
Thanks.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default find textbox insertion point

Thanks...that's exactly what I need.

"Peter T" <peter_t@discussions wrote in message
...
Private Sub TextBox1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If Button = 1 Then
With TextBox1
Me.Caption = .CurLine & " " & .SelStart & " " & .SelLength
End With
End If
End Sub

Regards,
Peter T

"Bert" wrote in message
news:F14Uj.8546$Jb2.8467@trndny03...
Is there a way to test for the current insertion point in a Userform
textbox--if, for example, there are 100 characters in the textbox, and
the
user clicks at a point in the textbox, is there a way to find out where
in
the string the user has clicked.
Thanks.








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Insertion Point Sandman Excel Discussion (Misc queries) 2 July 5th 08 04:44 PM
Why did my Excel insertion point change to a cross? TrishF New Users to Excel 2 February 4th 07 08:11 PM
how to change the insertion point color? smc11ca Excel Worksheet Functions 0 October 31st 06 05:11 PM
causing macros to run at insertion point Inobugs Excel Worksheet Functions 3 February 1st 06 06:19 AM
Positioning the Insertion Point in a TextBox DennisE Excel Programming 2 February 2nd 04 03:47 AM


All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"