View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default setting tab order by code

Use the Exit event to do the validation, then set cancel = True to stay in
the text box if you decide the entry is invalid.

--
Regards,
Tom Ogilvy

dlrauh wrote in message
...
I have a form that has 4 text boxes and two buttons. When an invalid
entry is found I want the focus to be set to the originating text box.
Now when you press enter and the invalid entry is discovered the focus
is set to the next tab box even when I set the focus back to the
original text box. Any ideas?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/