Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Errors in .EXE versus Development Environment

Posted on 1998-09-04
3
Medium Priority
?
156 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 150 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

916 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