Text box on userform

  • Thread starter Thread starter pcrobinson
  • Start date Start date
P

pcrobinson

Hi
having loaded a userform I want to enter data in the first text box
without having to click in it with the mouse first. The tab order is correct
and I have tried the command "textbox1.setfocus"
in the userform initialization code but this does not work and I still have
to click the mouse in the text box before entering.
Thanks for any help
Peter
 
Peter,

Is this happening the first time you call up the form, or on subsequent
calls to the form,? If the latter, you might want to try the
UserForm_Actgivate event.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Did you put this in the Userform_Initialize? Try changing the name of
the subroutine to Userform_Activate.
 
Spot on! Thanks
Bob Phillips said:
Peter,

Is this happening the first time you call up the form, or on subsequent
calls to the form,? If the latter, you might want to try the
UserForm_Actgivate event.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top