Link to home
Start Free TrialLog in
Avatar of Hepen
Hepen

asked on

How do you know if a textbox has focus?

How do you know if a textbox has focus?
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

if form's ActiveControl is the Textbox
Like angelIII said:

if Me.ActiveControl = yourtextbox.name then ...
Private Sub Text1_GotFocus()
Debug.Print "getfocus"
End Sub
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial