AddHandler btnDivide.Click, AddressOf Me.btnDivide_Click

but vb.net says     "btnDivide_Click" is not a member of this form

why?   I'm sure ,I put this button in that form.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you dont have to specify addhandler just do...
public sub btndivid.click handles me.btndivide_click
that's the way to do this in vb .net
with the keyword handles
you may have a BUTTON named btnDivide, but do you in fact have a SUB declared as Private Sub btnDivied_Click(byVal sender as Object, byVal e as System.EventArgs) ?  That is necessary for the

AddressOf Me.btnDivide_Click

part of the AddHandler line to work properly.

but eliaslopezgtz is correct, it is USUALLY not necessay to manually add Event Handlers.

Fahad MukhtarDistinguished EngineerCommented:
try to replace the line:

AddHandler btnDivide.Click, AddressOf Me.btnDivide_Click
AddHandler btnDivide.Click, New EventHandler(AddressOf btnDivide_Click)

i think you have put that button correctly on your form..
but accidently you have deleted the subroutine that handles  its "Click" Event
in short have "btnDivide" on your form. But you dont have "btnDivide_Click" in your code

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
No response from gegou from 10/22/2003 comment
Award points to Desp is recommend.
Please leave any comments here within the next seven days.

EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.