Not triggering "BeforeUpdate" in text box on UserForm

M

Marchand Durpis

OK, so I need an education here (and what better place to find one...)
In Excel 97 I have a UserForm with a text box that has VBA code in the
'__BeforeUpdate()' event. The form also has a command button. It
appears that if the user types stuff in the textbox, then immediately
mouse-clicks the command button, the _beforeUpdate() event of the text
box is not triggered. It also appears that the ControlSource range of
the text box is not updated in this circumstance.
The _Change() event is not a particularly good option here, since I
still have to know when the user has fully completed the textbox
entry, not just added or deleted one character. It also seems that the
ControlSource range isn't updated by or with the _Change event.
I'm assuming there's a setting that I'm missing here somewhere. The
alternative seems to be to re-write VBA code behind commandbuttons to
duplicate the work of the _BeforeUpdates and the ControlSource
property for all the text boxes on the form -- which seems a silly
redundancy.
So, anyone want to offer quick lesson about what's going on here, and
whether this behavior varies between Excel 97, 2K and 2002? It would
be greatly appreciated.

/Marchand/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top