Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change Insertion Point | Excel Discussion (Misc queries) | |||
Why did my Excel insertion point change to a cross? | New Users to Excel | |||
how to change the insertion point color? | Excel Worksheet Functions | |||
causing macros to run at insertion point | Excel Worksheet Functions | |||
Positioning the Insertion Point in a TextBox | Excel Programming |