Talismanic
Registered User.
- Local time
- Today, 00:20
- Joined
- May 25, 2000
- Messages
- 377
I am trying to get the text in a control to be selected when the user enters the box so that the user can enter a new number without deleting the text allready in the box.
Here is the code:
Private Sub txtEmployeeNumber_GotFocus()
txtEmployeeNumber.SelStart = 0
txtEmployeeNumber.SelLength = Len(txtEmployeeNumber.Text)
End Sub
This should work but it isn't. I am using this in a combo box, could that be the problem. If so, how do I do this?
Here is the code:
Private Sub txtEmployeeNumber_GotFocus()
txtEmployeeNumber.SelStart = 0
txtEmployeeNumber.SelLength = Len(txtEmployeeNumber.Text)
End Sub
This should work but it isn't. I am using this in a combo box, could that be the problem. If so, how do I do this?