Tab orders by jump cursor in specific textbox on userform

Maklil

Board Regular
Joined
Jun 23, 2022
Messages
174
Office Version
  1. 2019
Platform
  1. Windows
Hello,
I need way to tab order in specific textboxes
I have textbox1,textbox2, textbox 3,textbox 4,textbox5,textbox6 . so when tab order should be textbox1,textbox3,textbox6 and jump for the others textboxes.
should not show set focus cursor into textbox 2,4,5 totally when press enter from textbox to next textbox .
example: when press enter into textbox1 then will move to textbox3 and when press enter then will move to textbox6 and when press enter will move to textbox1
thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Select View / Tab Order. In the Window Tab Order, You can set the order of the tab

1729539582778.png
 
Upvote 0
I know this way . based on my question is not what I want .
just try to read again especially
should not show set focus cursor into textbox 2,4,5 totally when press enter from textbox to next textbox .
 
Upvote 0
In the textbox properties, find the TabStop parameter and change the value True to False. This will prevent the cursor from moving to this textbox; it will jump to the next textbox for which the TabStop parameter is set to True.
 
Upvote 0
when press enter then will move to textbox6 and when press enter will move to textbox1
For that, put the following code in your userform


VBA Code:
Private Sub TextBox6_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
  If KeyCode = 13 Then
    TextBox1.SetFocus
  End If
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top