Simple SetFocus on userform issue
OK, I am a little lost with that...
so what is the method to have the focus retained in the textbox that I
am working in? (I never want the focus to leave for any reason other
than manually clicking away from it).
Thank you...
On Oct 1, 3:13*pm, "JLGWhiz" wrote:
I believe that if the value window of the textbox is empty, the focus
automatircally goes bacward to the next control with a value, and if they
are all empty it will go to the first index in tab order. *But as soon as
you click on the textbox it takes focus.
"JLGWhiz" wrote in message
...
I don't understand the problem. *If you are using the AfterUpdate event,
which occurs by User Interface changes, then the focus should already be on
the control. *What is it doing/or not doing. *Where is the focus after the
event?
"SMS" wrote in message
....
Well, it SOUNDS simple...
Userform with three controls, TextBox1, TextBox2, TextBox3
For TextBox2 ONLY, I have this code:
*Private Sub TextBox2_afterupdate()
* * *counter = counter +1
* * *TextBox2.Text = ""
* * *TextBox2.SetFocus
*End Sub
This is supposed to increment a counter, clear the textbox... and here
is the ****er: SET THE FOCUS BACK TO TEXTBOX2.
This appears to be impossible... I have spent hours on it.
Please help!
Again, the sole goal here is to get the same text box to have focus
when the event is finished.
Thank you SO much...- Hide quoted text -
- Show quoted text -
|