Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate Textbox value based on another textbox value.doc Tdungate Excel Discussion (Misc queries) 1 February 12th 09 07:11 PM
Calculate Textbox value based on another textbox value Tdungate Excel Discussion (Misc queries) 0 February 12th 09 07:03 PM
event which occurs when a TextBox receives focus Mikhail Excel Programming 2 October 7th 03 02:27 PM
Which textbox have focus? Tom Ogilvy Excel Programming 0 August 27th 03 03:12 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 06:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"