Hi,

I'm making a userform that changes depending on a number entered on a textbox. It has a TextBox on top and 2 buttons on the bottom. When a number is entered on the TextBox then that amount of textbox appear. They are visible = false and enabled = false. And on the after_update method of the top TextBox I enable and make visible the amount necesary. This TextBoxes appear between the top one and the buttons.

So my problem is, when I enter a number the textboxes appear but the focus goes to the first button, even though I already set the tabindex of the buttons to be last. So at the end of the after_update method I tried to use setFocus but it does nothing. What I think happens is that when the setFocus is called, the textboxes aren't visible and enabled yet (the code is before but I think it's what is happening).

Any suggestions?
If you need the code just let me know.

Thanks in advanced