Solved

Errors in .EXE versus Development Environment

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

757 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

21 Experts available now in Live!

Get 1:1 Help Now