How to determine the end point of text selection in the text box? for example: Start of 3 and select to 5 character in textbox1. 0000000 (Selection with the ability to edit selected text.)
Private Sub textbox1_change()
If TextBox1.TextLength = 7 Then
With TextBox1
.SetFocus
.SelStart = 2
.SelLength = Len(.Text)
End With
End If
End Sub
In Text.SelLength = Len(.Text)
, insert .SelLength = 3
.