I wrote this code to be able to highlight a text box when it gets the focus:
Private Sub txtRa_GotFocus()
With txtRa
.SelStart = 0
.SelLength = .MaxLength
End With
End Sub
But it doesn't work when the textbox is empty and I can't assign any initial value at design time becasuse there is a validation routine involved.
any help will be greatly appreciated.
Private Sub txtRa_GotFocus()
With txtRa
.SelStart = 0
.SelLength = .MaxLength
End With
End Sub
But it doesn't work when the textbox is empty and I can't assign any initial value at design time becasuse there is a validation routine involved.
any help will be greatly appreciated.