-
I am creating a password protection form. I want to be able to press enter right after typing the last character of the password instead of having to tab to the 'continue' button. How do I do that?
Also, if the password that they type is incorrect, how do you highlight the entire textbox where you type the password into so that you don't need to delete what you mistyped?
smh
(One of those days....)
-
Set the Default property of the Continue button to True, then enter will active the buttons Click event.
USe the Textbox's SelStart and SelLength properties to Highlight the text, i.e.
Code:
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
-
Code:
Private Sub txtPassword_GotFocus()
On Error Resume Next
SendKeys "{Home}+{End}"
End Sub
-
thanks
Thanks, Aaron...worked great!