Solved

Errors in .EXE versus Development Environment

Posted on 1998-09-04
3
149 Views
Last Modified: 2010-04-30
I am trying to trace a very difficult error.  The error message is:

"Error 5 - Invalid procedure call or argument"

This error occurs when running the .EXE file ONLY, but when I run the program in the Development Environment, the error does NOT occur.  I have put flags in the code to try and identify the range of code in which the error occurs, but am not having much luck as I can only test it in the .EXE mode and thus must recompile the program each time I make a change.

My basic question is this - what kind of error would give this type of message ONLY in the .EXE file and NOT in the development environment?

Any thoughts about either a diagnosis and/or a fix?

dougr
0
Comment
Question by:dougr
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
dabellei earned 50 total points
ID: 1433073
Their might be lots of reasons.  One thing i do when i have this problem is that i put on error goto ...  statement a the beginning of each procedure.  After each line of code wich i think me cause the problem i put   number = x  i increment the value of x each time and in the error routine i put the following

msgbox str$(x)

then i can find exactly where my program is bugging in the exe file without recompiling each time the program.

If you can find where the error is then send this part of code and i'll look at it for you.  If it's not a big program then send it to me i'll take a look.


0
 

Author Comment

by:dougr
ID: 1433074
To: dabellei  

Thanks for the suggestion.  I will try your method, and if I find the error location I will let you know.  

I will also leave the question open for a day or two in case anyone else wants to comment.

Thanks again

dougr
0
 

Author Comment

by:dougr
ID: 1433075
To: dabellei

I tried your method of narrowing in on errors.  It generally works well, although sometimes surprises me with an error in a part of the code which seems out of character with the type of error you would expect in the line in question.  Generally this occurs when the error occurs within a lostfocus or deactivate routine triggered by the line in question.

dougr
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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

932 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

15 Experts available now in Live!

Get 1:1 Help Now