ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tabs Jumping (https://www.excelbanter.com/excel-programming/418941-tabs-jumping.html)

Art

Tabs Jumping
 
Hello:

How can I make a userform with some text boxes where the user enters some
text and when the text max is up it should jump tp the next tab. For E.G. if
the first tab maxLength is 5 and the user had entered already 5 letters, it
should jump to the next tab?

Thanks

Charlotte E.[_2_]

Tabs Jumping
 
You need to do this in the Textbox_Change event.

Say, in your Textbox is called 'Textbox1' then you could make af line in the
event procedure, something like this:

If Len(Texbox1.Value) = 5 Then

What goes after the 'Then' depends on what and where you want to jump to,
but hopefully you get the idea :-)

However, be aware that if the user enters a wrong 5th character, the user
will not be ablue to just hit backspace to correct the error!


CE



art wrote:
Hello:

How can I make a userform with some text boxes where the user enters
some text and when the text max is up it should jump tp the next tab.
For E.G. if the first tab maxLength is 5 and the user had entered
already 5 letters, it should jump to the next tab?

Thanks




Art

Tabs Jumping
 
Thanks. Lets say I have Textbox2 what should I write to jump?
GoTo textbox2?


"Charlotte E." wrote:

You need to do this in the Textbox_Change event.

Say, in your Textbox is called 'Textbox1' then you could make af line in the
event procedure, something like this:

If Len(Texbox1.Value) = 5 Then

What goes after the 'Then' depends on what and where you want to jump to,
but hopefully you get the idea :-)

However, be aware that if the user enters a wrong 5th character, the user
will not be ablue to just hit backspace to correct the error!


CE



art wrote:
Hello:

How can I make a userform with some text boxes where the user enters
some text and when the text max is up it should jump tp the next tab.
For E.G. if the first tab maxLength is 5 and the user had entered
already 5 letters, it should jump to the next tab?

Thanks





Susan

Tabs Jumping
 
If Len(Texbox1.Value) = 5 Then
Textbox2.SetFocus

try that
:)
susan



On Oct 23, 11:17*am, art wrote:
Thanks. Lets say I have Textbox2 what should I write to jump?
GoTo textbox2?



"Charlotte E." wrote:
You need to do this in the Textbox_Change event.


Say, in your Textbox is called 'Textbox1' then you could make af line in the
event procedure, something like this:


If Len(Texbox1.Value) = 5 Then


What goes after the 'Then' depends on what and where you want to jump to,
but hopefully you get the idea *:-)


However, be aware that if the user enters a wrong 5th character, the user
will not be ablue to just hit backspace to correct the error!


CE


art wrote:
Hello:


How can I make a userform with some text boxes where the user enters
some text and when the text max is up it should jump tp the next tab.
For E.G. if the first tab maxLength is 5 and the user had entered
already 5 letters, it should jump to the next tab?


Thanks- Hide quoted text -


- Show quoted text -



Art

Tabs Jumping
 
Thanks.

"Susan" wrote:

If Len(Texbox1.Value) = 5 Then
Textbox2.SetFocus

try that
:)
susan



On Oct 23, 11:17 am, art wrote:
Thanks. Lets say I have Textbox2 what should I write to jump?
GoTo textbox2?



"Charlotte E." wrote:
You need to do this in the Textbox_Change event.


Say, in your Textbox is called 'Textbox1' then you could make af line in the
event procedure, something like this:


If Len(Texbox1.Value) = 5 Then


What goes after the 'Then' depends on what and where you want to jump to,
but hopefully you get the idea :-)


However, be aware that if the user enters a wrong 5th character, the user
will not be ablue to just hit backspace to correct the error!


CE


art wrote:
Hello:


How can I make a userform with some text boxes where the user enters
some text and when the text max is up it should jump tp the next tab.
For E.G. if the first tab maxLength is 5 and the user had entered
already 5 letters, it should jump to the next tab?


Thanks- Hide quoted text -


- Show quoted text -




Rick Rothstein

Tabs Jumping
 
You would use the SetFocus method...

If Len(TextBox1.Value) = 5 Then TextBox2.SetFocus

--
Rick (MVP - Excel)


"art" wrote in message
...
Thanks. Lets say I have Textbox2 what should I write to jump?
GoTo textbox2?


"Charlotte E." wrote:

You need to do this in the Textbox_Change event.

Say, in your Textbox is called 'Textbox1' then you could make af line in
the
event procedure, something like this:

If Len(Texbox1.Value) = 5 Then

What goes after the 'Then' depends on what and where you want to jump to,
but hopefully you get the idea :-)

However, be aware that if the user enters a wrong 5th character, the user
will not be ablue to just hit backspace to correct the error!


CE



art wrote:
Hello:

How can I make a userform with some text boxes where the user enters
some text and when the text max is up it should jump tp the next tab.
For E.G. if the first tab maxLength is 5 and the user had entered
already 5 letters, it should jump to the next tab?

Thanks







All times are GMT +1. The time now is 12:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com