1
votes

I started working in an old application for a client (hence i cannot add that much code). The application have some forms. On the main form i select a value from a dropdown list this calls a form to load. When this happens i'getting an error:

Compile error: Sub or function not defined

I started debugging and put some breakpoints and the program stops at the very:

Private Sub Form_Load()

It's a complex application with many forms and .bas files so i cannot add that much code since is not my application but in general is someone have heard about this and can give me orientation on what should be my next move please.

If i delete or comment Form_Load the program goes on but crashes later on since this sub process important data.

Regards!

1
Without knowing what is in that Form_Load Method it is going to be hard to help. Make sure you have all of the dependency's satisfied that your project requiresMark Hall
Does the program continue a bit further if you press F8 after it as stopped? Does it go into Form_Load at all? Is it possible to post the code of Form_Load? .. Also try to put a breakpoint at the very start of every Form_* sub to find out wether is any of the other Form_* subs which might be the problemHrqls
What is the "Startup Object" of the project? You can find that in the menu: Project - <projectname> Properties - General tabHrqls
When the debugger displays the error and breaks on the line Form_Load() it should also highlight the line (sub or function) that is not being found.jac
Thanks for all your comments and replies. As for putting more code here to give you guys more insight about, as i stated before, this code belongs to a company and unfortunately i cannot publish any of it here. I contacted them, they sent me a new solution of the project and it worked like a charm so i supposs it was a matter of an "unworking" code. Thanks again to everybody!Ph0b0x

1 Answers

0
votes

I guess sometimes we have to load the solution again.

I think this was a matter of a faulty solution. I contacted the client and they sent an updated solution.

Thanks everybody for your help.