Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox Focus
Wondering if this is possible (it's giving me an error).
On a UserForm I have Frame1 with TextBox1 in it. I have Frame2 with TextBox2 in it. How can I set focus to TextBox2 in the AfterUpdate event for TextBox1?? Frame2.TextBox2.SetFocus ' doesn't work TextBox2.SetFocus ' doesn't work Setting the Tab order doesn't work either. Any ideas?? Thanks, John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox Focus
frame1 - tabindex 0
frame2 - tabindex 1 within each frame, the textboxes had tabindex 0 for me, hitting enter in textbox1 (frame1) put the focus in the textbox in frame2 Regards, Tom Ogilvy "John Wilson" wrote in message ... Wondering if this is possible (it's giving me an error). On a UserForm I have Frame1 with TextBox1 in it. I have Frame2 with TextBox2 in it. How can I set focus to TextBox2 in the AfterUpdate event for TextBox1?? Frame2.TextBox2.SetFocus ' doesn't work TextBox2.SetFocus ' doesn't work Setting the Tab order doesn't work either. Any ideas?? Thanks, John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox Focus
Tom,
Tried that and it didn't work :-( I'll play around wit it again tomorrow and see if I can come up with something else. The easy way out would be to place both TextBoxes in the same Frame but I shoudn't "have" to do that. Thanks, John "Tom Ogilvy" wrote in message ... frame1 - tabindex 0 frame2 - tabindex 1 within each frame, the textboxes had tabindex 0 for me, hitting enter in textbox1 (frame1) put the focus in the textbox in frame2 Regards, Tom Ogilvy "John Wilson" wrote in message ... Wondering if this is possible (it's giving me an error). On a UserForm I have Frame1 with TextBox1 in it. I have Frame2 with TextBox2 in it. How can I set focus to TextBox2 in the AfterUpdate event for TextBox1?? Frame2.TextBox2.SetFocus ' doesn't work TextBox2.SetFocus ' doesn't work Setting the Tab order doesn't work either. Any ideas?? Thanks, John |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox Focus
No you shouldn't, so there must be more involved than what you describe.
-- Regards Tom Ogilvy "John Wilson" wrote in message ... Tom, Tried that and it didn't work :-( I'll play around wit it again tomorrow and see if I can come up with something else. The easy way out would be to place both TextBoxes in the same Frame but I shoudn't "have" to do that. Thanks, John "Tom Ogilvy" wrote in message ... frame1 - tabindex 0 frame2 - tabindex 1 within each frame, the textboxes had tabindex 0 for me, hitting enter in textbox1 (frame1) put the focus in the textbox in frame2 Regards, Tom Ogilvy "John Wilson" wrote in message ... Wondering if this is possible (it's giving me an error). On a UserForm I have Frame1 with TextBox1 in it. I have Frame2 with TextBox2 in it. How can I set focus to TextBox2 in the AfterUpdate event for TextBox1?? Frame2.TextBox2.SetFocus ' doesn't work TextBox2.SetFocus ' doesn't work Setting the Tab order doesn't work either. Any ideas?? Thanks, John |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox Focus
Tom,
No you shouldn't, You're right. I tried what you suggested in a brand new workboook with a brand new userform and it worked as you said it would. so there must be more involved than what you describe Obviously something in my coding or whatever on that UserForm. I'll go back and try to find out where my mistake is. Thanks, John "Tom Ogilvy" wrote in message ... No you shouldn't, so there must be more involved than what you describe. -- Regards Tom Ogilvy "John Wilson" wrote in message ... Tom, Tried that and it didn't work :-( I'll play around wit it again tomorrow and see if I can come up with something else. The easy way out would be to place both TextBoxes in the same Frame but I shoudn't "have" to do that. Thanks, John "Tom Ogilvy" wrote in message ... frame1 - tabindex 0 frame2 - tabindex 1 within each frame, the textboxes had tabindex 0 for me, hitting enter in textbox1 (frame1) put the focus in the textbox in frame2 Regards, Tom Ogilvy "John Wilson" wrote in message ... Wondering if this is possible (it's giving me an error). On a UserForm I have Frame1 with TextBox1 in it. I have Frame2 with TextBox2 in it. How can I set focus to TextBox2 in the AfterUpdate event for TextBox1?? Frame2.TextBox2.SetFocus ' doesn't work TextBox2.SetFocus ' doesn't work Setting the Tab order doesn't work either. Any ideas?? Thanks, John |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox Focus
Tom,
In the Textbox1 After_Update event, I had the following code: TextBox2.Enabled = True Removing that line of code cured my woes. Thanks, John "John Wilson" wrote in message ... Tom, No you shouldn't, You're right. I tried what you suggested in a brand new workboook with a brand new userform and it worked as you said it would. so there must be more involved than what you describe Obviously something in my coding or whatever on that UserForm. I'll go back and try to find out where my mistake is. Thanks, John "Tom Ogilvy" wrote in message ... No you shouldn't, so there must be more involved than what you describe. -- Regards Tom Ogilvy "John Wilson" wrote in message ... Tom, Tried that and it didn't work :-( I'll play around wit it again tomorrow and see if I can come up with something else. The easy way out would be to place both TextBoxes in the same Frame but I shoudn't "have" to do that. Thanks, John "Tom Ogilvy" wrote in message ... frame1 - tabindex 0 frame2 - tabindex 1 within each frame, the textboxes had tabindex 0 for me, hitting enter in textbox1 (frame1) put the focus in the textbox in frame2 Regards, Tom Ogilvy "John Wilson" wrote in message ... Wondering if this is possible (it's giving me an error). On a UserForm I have Frame1 with TextBox1 in it. I have Frame2 with TextBox2 in it. How can I set focus to TextBox2 in the AfterUpdate event for TextBox1?? Frame2.TextBox2.SetFocus ' doesn't work TextBox2.SetFocus ' doesn't work Setting the Tab order doesn't work either. Any ideas?? Thanks, John |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox Focus
Tom,
Neglected to mention in that last post that I had TextBox2 disabled in the UserForm Activate event (you probably already figured that out). I would venture to guess that Excel tries to tab to TextBox2 before the code in the the TextBox1.After_Update event can enable it. Thanks, John "John Wilson" wrote in message ... Tom, In the Textbox1 After_Update event, I had the following code: TextBox2.Enabled = True Removing that line of code cured my woes. Thanks, John "John Wilson" wrote in message ... Tom, No you shouldn't, You're right. I tried what you suggested in a brand new workboook with a brand new userform and it worked as you said it would. so there must be more involved than what you describe Obviously something in my coding or whatever on that UserForm. I'll go back and try to find out where my mistake is. Thanks, John "Tom Ogilvy" wrote in message ... No you shouldn't, so there must be more involved than what you describe. -- Regards Tom Ogilvy "John Wilson" wrote in message ... Tom, Tried that and it didn't work :-( I'll play around wit it again tomorrow and see if I can come up with something else. The easy way out would be to place both TextBoxes in the same Frame but I shoudn't "have" to do that. Thanks, John "Tom Ogilvy" wrote in message ... frame1 - tabindex 0 frame2 - tabindex 1 within each frame, the textboxes had tabindex 0 for me, hitting enter in textbox1 (frame1) put the focus in the textbox in frame2 Regards, Tom Ogilvy "John Wilson" wrote in message ... Wondering if this is possible (it's giving me an error). On a UserForm I have Frame1 with TextBox1 in it. I have Frame2 with TextBox2 in it. How can I set focus to TextBox2 in the AfterUpdate event for TextBox1?? Frame2.TextBox2.SetFocus ' doesn't work TextBox2.SetFocus ' doesn't work Setting the Tab order doesn't work either. Any ideas?? Thanks, John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculate Textbox value based on another textbox value.doc | Excel Discussion (Misc queries) | |||
Calculate Textbox value based on another textbox value | Excel Discussion (Misc queries) | |||
event which occurs when a TextBox receives focus | Excel Programming | |||
Which textbox have focus? | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |