Solved

why?

Posted on 2003-10-22
5
166 Views
Last Modified: 2010-05-03
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.
0
Comment
Question by:gegou
5 Comments
 

Expert Comment

by:eliaslopezgtz
ID: 9601304
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
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9601683
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.

AW
0
 
LVL 19

Accepted Solution

by:
Desp earned 125 total points
ID: 9602154
try to replace the line:

AddHandler btnDivide.Click, AddressOf Me.btnDivide_Click
with
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
0
 
LVL 27

Expert Comment

by:planocz
ID: 10154704
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.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

planocz
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now