Error: Invalid Procedure call or argument

E

Eric

I run a program which read emails from a text file. There is some thing
invalid in one or more text file. When program is busy doing parsing it
shows that error and process stop. I dont know which text file has that
error. Is it possible that i can handle that error during processing
some thing i mean ignore line, email so that my process will not be
interrupt.


Error: Invalid Procedure call or argument
Run time error 5


I want to handle this error by means of skip that line, email or any
thing but not to stop the parsing.
 
A

Albert D. Kallal

You have two choices:

1) Change your code so that is does not error (either test for the bad
condition before the code stops/craps out), or
simply put in some error handling code.....

2) You use error handling code could simply just jump over the code that
does the parsing..and simply move on to the next
line of data...

So, at the top of your import code, put in a

on error goto nextline


In your import code, put in a label called

nextline:

the above could be place after the code that parses...but right before the
loop starts over for the next line of data....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top