Excel VBA Textbox positioning cursor

  Heefie 21:46 14 Oct 05

A quick question please. When i open a userform that contains a textbox & 2 buttons (OK & Cancel).. The OK buton is currently selected... How do I force the cursor to be in the textbox?

Cheers in advance

  Access genu 21:50 14 Oct 05

right click on the form in design mode and select tab order, move the textbox to the top of the list

  Skills 22:13 14 Oct 05

I think you can also use the setfocus command

eg textbox1.setfocus

which means that the focus will be set to the textbox and therefore the cursor will be placed there. Thats if i remember correctly.

  Heefie 13:11 17 Oct 05

The first option worked perfectly, the second I haven't tried yet, but thanks for the suggestion, I'll get around to it !!!

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

Nintendo Switch (Nintendo NX) release date, price, specs and preview trailer: Codename NX console…

1995-2015: How technology has changed the world in 20 years

8 things designers (and brands) need to know about the modern woman

How to speed up a slow Mac: 19 great tips to make an iMac, MacBook or Mac mini run faster | Speed…