I have a UserForm with 60 TextBoxes and other controls. I would like to write code that will loop through the TextBoxes and set the value of the TabIndex to be equal to that of the TextBox number so that they can be tabbed through in order. The code will look something like this:
Sub SetTabIndex ()
For i = 1 to 60
InputTable.Control("txt" & i).TabIndex = i - 1
Next i
End Sub
The TextBoxes are named "txt1"-"txt60" and the UserForm is "InputTable"
Is there any way to set the TabIndex using VBA?
Sub SetTabIndex ()
For i = 1 to 60
InputTable.Control("txt" & i).TabIndex = i - 1
Next i
End Sub
The TextBoxes are named "txt1"-"txt60" and the UserForm is "InputTable"
Is there any way to set the TabIndex using VBA?