Focus on correct textbox in UserForm

  Desert Andy 13:01 22 Apr 10
Locked

I am using a userform to aquire data from the end user. However, when the userform appears, the focus is on the incorrect textbox, so the user has to select the correct textbox before they can entere the data. How do I set the focus on the correct textbox when I get the Userform to appear. I am writing code inVBA for Excel 2007. Thanks very much.

  VoG II 13:12 22 Apr 10

Right click the userform and select Tab Order. You can then change the order as needed.

  KremmenUK 13:22 22 Apr 10

Not used VBA for ages but in VB you can use the .setfocus method as long as the form is loaded.

The above Tab Order is your first port of call though as you should have them in the order required in case the user tends to use keyboard before the mouse.

  Desert Andy 13:24 22 Apr 10

Thanks very much

This thread is now locked and can not be replied to.

Surface Pro 5 News - release date, UK price, features, specs

Animator Emanuele Kabu’s psychedelic video is a stunning tribute to Lisbon city

Best Mac antivirus 2017