• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run Code When Tab Key Is Pressed (Or UserForm TextBox Is Activated)?

I'm using Private Sub TextBox1_Change()


But it processing too much code for every letter I type.


I was thinking perhaps using TextBox1_Activate() but nothing happens.


I just thought it'd be nice to run my code from box to box instead of refreshing the code after every single key stroke.


As always any help is greatly appreciated.
 
Why not use the LostFocus event? That way you can type whatever you want, and then when you're done and "move on", the macro will run?

[pre]
Code:
Private Sub TextBox1_LostFocus()
'Do something
End Eub
[/pre]
 
Back
Top