Solved

Errors in .EXE versus Development Environment

Posted on 1998-09-04
3
150 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DIR issue 7 53
Zip Folders Using Chilkat Routines 1 36
How to read File Date Created using VB6 8 38
VBA - If Bookmark = "XXBOOKMARKXX" then 15 23
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…
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…

813 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

10 Experts available now in Live!

Get 1:1 Help Now