View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Putting Focus into Textbox

I have a userform that I am using a barcode scanner to populate a
text box. When the form loads the cursor is in the barcode textbox.
On change event it does some stuff unloads the form and then runs the
macro that loads the form. When it reloads the Cancel button is the
active control. Every time that the form loads I want the cursor on
the barcode text box. How do I make this happen? It is at the top
of the tab order.

Thanks,
Jay


Perhaps have a look at the SelStart and SelLength properties...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus