Can I raise built-in events for a control

G

Gary Hillerson

Is there any way I can programmatically invoke the After_Update event
for a control in a userform?

What I'd like to do is something like:
for each ctrl in Me.controls
ctrl_AfterUpdate
next ctrl

I can code the loop like this, but it's ugly and a lot of work and I
have to know the name of each control to make it work:

for each ctrl in Me.controls
Select ctrl.name
Case "TextBox01"
call TextBox01_AfterUpdate
Case "TextBox02"
call TextBox02_AfterUpdate
...
End Select
next ctrl

I'm thinking there must be a way to raise the event on a control. Is
there?

thanks in advance,
gary
 

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