Thread: Tabs Jumping
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default 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