My question is simple. And here it is : Does anyone knows how do i disable the focus of a textbox. Like setfocus = false in a normal vb6. Unfortunately it doesn't work in PowerPoint.
Thanks.
My question is simple. And here it is : Does anyone knows how do i disable the focus of a textbox. Like setfocus = false in a normal vb6. Unfortunately it doesn't work in PowerPoint.
Thanks.
Hi and Welcome to VBAX!Originally Posted by hobgoblin
Don't think I've ever found use to do a thing like that so I'm curious.
Could explain what you are trying to do in more detail? Why is setting focus false so Important...what don't you want to happen?
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)
Ok. What I am doing is using the KeyUp (When i press enter) event of a textbox to get data. But if i have an error i show up a message box. And when user presses enter ( OK button of message box ) and the focus is on the textbox, VB catches it as an ENTER key press of the textbox as well. So it tries to get data again, and again, and again.... I tried to put enabled false, locked true etc on the textbox, but the texbox still catches the ENTER key press. And since i don't have any other textbox's I cant just shift focus out of it. That's about it. Any help would be very appreciated.
Have you considered using the Exit event of the textbox for the validation?
K :-)
Well that's the thing. I dont want to exit the texbox. What i want to do is to just temporarily disable it, and when i'm done getting data put the focus back on it.
I see... well that's most inconvenient
I had a quick test and it seems to behave properly on the KeyDown event
K :-)
OK KeyDown it is then
Thanks alot for your help.
Glad to see K helped you out!Originally Posted by hobgoblin
Don't forget to mark to thread solved?
_________
Groetjes,
Joost Verdaasdonk
M.O.S. Master
Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
(I don't answer questions asked through E-mail or PM's)