Hello,
I am trying to TAB to one text box from another and I want whole of the test to be selected when I TAB into the next field,
Any Help,
Thankx in advance
Printable View
Hello,
I am trying to TAB to one text box from another and I want whole of the test to be selected when I TAB into the next field,
Any Help,
Thankx in advance
private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = len(Text1.Text)
End Sub
Try something like :
'
private Sub Text1_GotFocus()
GotFocus Text1
End Sub
'
private Sub Text2_GotFocus()
GotFocus Text2
End Sub
'
private Sub GotFocus(oTxt as TextBox)
on error resume next
'
oTxt.SelStart = 0
oTxt.SelLength = len(oTxt.Text)
'
End Sub
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb