Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form Onload event just stopped working - No code changes

Status
Not open for further replies.

asmith555

Programmer
Oct 7, 2002
97
US
I have tried deleting the onload event as well as other form events and even left them empty. I get the error message: "The Expression On Load |On Change | ect.. you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name." The rest of my forms work fine. It was working fine and it just started producing these errors. Please help
 
Procedure declaration does not match description of event or procedure having same name


Yourclass module has a procedure name that conflicts with the name of an event. This error has the following cause and solution:

A procedure has the same name as an event, but does not have the same signature (that is, the number and types of the parameters). This can occur if you do something such as add a new parameter to an event procedure. For example, if you modify the definition of a form's Form_Load event procedure as follows, this error will occur:
Sub Form_Load (MyParam As Integer)
. . .
End Sub

If the procedure isn't the event procedure corresponding to the event, change its name. If the procedure corresponds to the event, make the parameter list agree with that required by the event (if any).


VBSlammer
redinvader3walking.gif
 
Hey

VBSlammer is right. I had the same problem and I checked over my code and compared each procedure signature to its original and the After_Update() for a listbox was signed After_Update( Cancel As Integer). Now how that happened, I dont know. It was probably my fault, but once I gave it its proper signature (with no arguments), no more of that funky error. Enjoy (^_^) Sticking feathers up your a$* does NOT make you a chicken!
-Fight Club
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top