On my form I have a TextBox_Exit that is not executing unless I backup through the TabIndex order.
If I click Shift+Arrow, the Text_Exit executes, but if I just click Arrow or Enter, it doesn't execute.
It's in a group of 5 TextBoxes that are handled identically, and are one right after the other in the TabIndex order (this one is the last one in the TabIndex order), and the other 4 work fine, so I know that it's not the code itself.
Is there any reason, other than a corrupted file that could cause this?
Actually, I just lost the whole thing. Excel crashed and I didn't have the changes to the userform saved yet, so I get to start over. But I would still be interested in an answer.
Last edited by foxguy; 09-03-2010 at 02:54 PM.
This got even weirder. When Excel crashed and I had to open the file again, the TextBox_Exit sub and code were still there, but the TextBox itself wasn't.
Were they in a Frame?
Yes they are in a Frame. This particular Textbox wasn't the last one to be put into the Frame, but it is the last one in the TabIndex Order of the Frame. How does that affect things?
I have the same problem again. Any suggestions on how to fix it? I'm going to try deleting the TextBox and then creating it again.
I think the frame exit event will preempt the textbox exit event.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
This is really getting to me.
There is no Frame_Exit sub. There are no Frame subs at all.
I just deleted the TextBox and recreated it, and I still have the same problem.
That you are not subscribed does not mean that the subscription is not availableThere is no Frame_Exit sub![]()
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
I just changed the TabIndex order and selected a different TextBox as the last one in the Frame and sure enough, it's Exit sub does not execute.
I'm reaching the conclusion that the last Exit sub inside a Frame doesn't execute even though there is no Frame_Exit. I assume that is a bug in Excel.
It was a bug going back to Excel 2000 (http://support.microsoft.com/kb/210734). Apparently it persists.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Thanks for the link. Now I have to figure out how to apply the workaround in my situation.
They only talk about the situation where the user clicks a control outside the Frame. It also doesn't work without clicking a control, just exiting the Frame during normal data entry causes the problem.
It's not how you leave the frame that's the issue, it's moving focus to a control outside the frame. Do you actually need the textboxes in a frame?
I don't actually have to have the frame, but it has 22 controls inside it, and I need to hide them all depending on answers to other questions. It's so much easier to just "Frame.Visible = False", rather than having to hide them all individually. And having the Frame there is visually better, since these controls are logically grouped together.
I think I found a solution and I posted it on another thread to see if anyone can see a problem with it. http://www.excelforum.com/excel-prog..._exit-bug.html
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks