I have been trying to figure out why it seems that the setfocus method is not working on this userform. It is a dynamic userform which is meant to add a new Sample ID textbox if the user tabs out of the last Sample ID textbox and the Enter Number of Samples TextBox (TextBox1) is empty. The event code to add the new Sample ID textbox is actually triggered by the Enter event handler of the CommandButton1. At the end of the Enter event handler I am trying to set the focus to the new control ' NewCtl.setfocus ' but it seems to only keep the focus on the CommandButton1.

I have attached the file with the userform and all code.
DynamicLabel_TextBox_UserForm.xls

Any help would be greatly appreciated.