A way refer to a control itself in an event handler

C

clara

Hi all,

I have 60 controls on a form, and every control will handle an event in the
same way, so I decide to abstract the process into a sub and make the sub
call with corresponding control. If I can refer to the control itself in its
event handler then the calling process will be same across all controls
handlers.
Could you tell me a way to refer to a form's control itself in one of its
event handler , for example,

Private Sub txtEI3_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
' here I hope to refer to the control txtEI3 in a generic way like Me because
'there will be universal sub call using the control as parameter like
' FillDate Thiscontrol
End Sub


Clara
thank you so much for your help
 

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