Solved

Errors in .EXE versus Development Environment

Posted on 1998-09-04
3
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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 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…
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…

738 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