Tabing in user form

L

lynz

I have a user form with text and combo boxes which I tab through to
input data. If I make a mistake I click the reset command button which
clears the boxes and i start again. However when I go to tab to the next
box my tabbing stays within the text box and doesnt advance to the next
text or combo box as it does when I first use the form. Any ideas on how
to fix this much appreciated thanks. L
 
D

Dave Peterson

It kind of sounds like you have to change the .tabkeybehavior property for that
textbox to false.

But that wouldn't explain why you could tab out of that textbox before. Any
chance that the reset routine is fiddling around with that property?
 
L

lynz

Dave said:
It kind of sounds like you have to change the .tabkeybehavior property for that
textbox to false.

But that wouldn't explain why you could tab out of that textbox before. Any
chance that the reset routine is fiddling around with that property?

Hi Dave this is my reset routine

Private Sub CommandButton3_Click()
ComboBox2.Value = "Animal mob"
ComboBox11.Value = ""
ComboBox12.Value = ""
TextBox17.Value = ""
ComboBox1.Value = "Numbers"
TextBox29.SetFocus

End Sub
Thanks L
 
L

lynz

lynz said:
Hi Dave this is my reset routine

Private Sub CommandButton3_Click()
ComboBox2.Value = "Animal mob"
ComboBox11.Value = ""
ComboBox12.Value = ""
TextBox17.Value = ""
ComboBox1.Value = "Numbers"
TextBox29.SetFocus

End Sub
Thanks L
Just repyling to myself here, I just tried it again and now cant get it
to tab in the boxes. It does happen quite often though so I will have
to try and remember exactly what I did when it starts happening. Its
quite annoying when it does as I have to close and reopen the form
again. Thanks L
 
D

Dave Peterson

The code doesn't change that tabbehavior. You would have seen something like:
textbox18.TabKeyBehavior = true

I don't see anything in your code that would cause this to happen.

If you select the first textbox, do things go back to working correctly.

If yes, look at the .tabindex and .tabstop for each of your controls.

Select a control in the userform, hit F4 to show the properties window and then
scroll down that property list.
 
L

lynz

Dave said:
The code doesn't change that tabbehavior. You would have seen something like:
textbox18.TabKeyBehavior = true

I don't see anything in your code that would cause this to happen.

If you select the first textbox, do things go back to working correctly.

If yes, look at the .tabindex and .tabstop for each of your controls.

Select a control in the userform, hit F4 to show the properties window and then
scroll down that property list.
Thank you I will check the controls.
L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top