The sender is the object that triggered the event. Since it is passed in as
an object variable, you will need to cast it to the appropriate type and
then invoke the methods or properties you need in order to uniquely identify
who broadcast the event.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"David A. Beck" <da****@beckb.com> wrote in message
news:eX**************@TK2MSFTNGP09.phx.gbl...
I would to set up a event routine for several command buttons. I need to
be able to identify by the caption or something whick button caused the event
to trigger. I think it's in the "sender" or "e" objects.
Private Sub cbOWN2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cbOWN2.Click, cbOWN3,Click
IF sender.caption = "cbOWN2" THEN bla bla bla ELSE yatta yatta
End Sub