Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I was wondering if there was a way to automatically change to a different text box after entering only one number. I know if you have multiple text boxes then you can enter info and then hit tab to switch to the next box. What I want to do is only enter one number into a text box and then have it move on to the next box. Thanks so much for any help. Larry |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Larry,
Try something like this: Private Sub TextBox1_Change() TextBox2.SetFocus End Sub For any change to the text in textbox1, textbox2 gets the focus. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks so much for your reply and help. I just have one more question. That
worked beautifully, but what if I wanted to enter 2 numbers into the textbox? Thanks so much! "Anita" wrote: Hi Larry, Try something like this: Private Sub TextBox1_Change() TextBox2.SetFocus End Sub For any change to the text in textbox1, textbox2 gets the focus. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can trigger it to switch after whatever number of numbers have been
typed in, for example: Private Sub TextBox1_Change() If Me.TextBox1.TextLength = 1 Then Exit Sub If Me.TextBox1.TextLength = 2 Then Me.TextBox2.SetFocus End Sub Will switch after two numbers have been typed in. You can use this logic to set it to whatever number you want by setting the TextLength = ? Anita |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I stop radio buttons moving left after Printing | Excel Discussion (Misc queries) | |||
Add buttons in a form from a datasource | Excel Discussion (Misc queries) | |||
Option Buttons | Excel Discussion (Misc queries) | |||
Option Buttons - groups | Excel Discussion (Misc queries) | |||
Option Buttons in Group Box | Excel Discussion (Misc queries) |