Dynamically Set Tab Order for TextBox Controls on UserForm using Excel VBA

preview_player
Показать описание
This video demonstrates how to dynamically set the tab order of TextBox Controls on a UserForm using Excel VBA. Setting the TabIndex property in the Visual Basic Editor and changing TabIndex with VBA code are reviewed.
Рекомендации по теме
Комментарии
Автор

mr Todd, which version of vba do you use ?

samerarab
Автор

Good Day Dr. Grande,


I have a VBA forms problem, and I'm pulling my hair out trying to solve. I have a form with a number of TextBox inputs, let's say Tabs 1 through 7. I input some "String" data in Textbox's 1, 2 and 3. In TextBox 4, I input an integer, "Private Sub Quantity_Enter()". I then check to see if the value entered is numeric, or blank, and if either of these values, I issue a MsgBox message. I then want to focus control back to TextBox 4 so I can input a numeric value. But control keeps going to TextBox5. I've tried your solution TextBox4.TabIndex = 4, but that doesn't work!


I know I'm being a bit presumptuous, but could you please advice me on what I'm doing wrong.


Regards


Joe Campanini

joecampanini