Sub that Handles different controls

M

mianiro

I have a sub procedure where I want to handle a link button and an
image button. I tried just adding the control name and .click at the
end of the declaration, but I get an error. Can anyone help me out?

Protected Sub lbCompanyRecord_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles lbCompanyRecord.Click, ibTest.Click
 
B

BigJohn

The easiest way is to create a Private Sub routine and call it from both
Click event routines. I know there are other ways, but sometimes the easiest
is best.
 
M

mianiro

The easiest way is to create a Private Sub routine and call it from both
Click event routines. I know there are other ways, but sometimes the easiest
is best.

Yeah thanks... that's how I'm going to work around it for now. Just
one of those qustions that bugs me!! Because I know there is a way to
do it!!
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top