This is to select a text forword
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
But this way (select a text back word):
Text1.SetFocus
Text1.SelStart = Len(Text1.Text)
Text1.SelLength = 0
it doesn't work !!
Printable View
This is to select a text forword
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
But this way (select a text back word):
Text1.SetFocus
Text1.SelStart = Len(Text1.Text)
Text1.SelLength = 0
it doesn't work !!
That's because you have it to select nothing.
I am :confused:confused:confused: on what you want to do though.Code:Text2.SelLength = 0
WEll when i use the code :
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
it will select the text form Left to Right and the cursor will be at the end,
what i what to do is to select the text form Right to left
so the cursor will be at the start !!: )
Something like this:
Code:Private Sub Command1_Click()
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
Do
Text2.SelLength = Text2.SelLength - 1
DoEvents
Loop Until Text2.SelLength = 0
End Sub
ahh man it doens't work :(
But is it possible /
Code:'starts at beginning of text in textbox
Private Sub Text1_GotFocus()
Text1.SelStart = 0
End Sub
'starts at the end of text in textbox
Private Sub Text2_GotFocus()
Text2.SelStart = Len(Text1.Text)
End Sub
I don't know about you guy's but it doen's work!!
anyay is it possible ?
Of course it works...all you need is two textboxes
Text1 and Text2 and then cut and copy the code.
Perhaps you should post your code.