Thread: on exit field
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default on exit field

Is this commandbutton the Cancel button of the userform?

If yes, then you could change its .takefocusonclick property to False (either in
the userform_initialize procedure or manually in the properties window).


peter wrote:

Hi,
On a user form, I have a field that fires "on exit". if the cursor is in
this field when a command button is clicked, the code for the on exit runs,
not the code for the button clicked. the button code is "on click".
Is there some way to know what button is clicked so the on exit code could
test for the click?
Is there some trick to get the cursor out of the field without firing the
code?
any help or ideas would be greatly appreciated.

peter


--

Dave Peterson