Set the selection in a TextBox : TextBox « Forms « VBA / Excel / Access / Word






Set the selection in a TextBox

 
Private Sub TextBox1_Enter()
    TextBox1.SelStart = 0
    TextBox1.SelLength = Len(TextBox1.Text)
End Sub

 








Related examples in the same category

1.Read input from TextBox and assign the value to ActiveCell
2.Copy workbook differences to the worksheet
3.Add TextBox and format it