Hi everyone,

(I am not that good at explaining things but i will try my best)

I have wriiten a vb program , which opens an excel file and runs the macro on it. The name of the file and the macro is passed to it through a command line.

basically this process has to be repeated for many files and macros combination , and a batch file will be wriiten which will execute this code automaticallly,

Now the vb file does following things,

opens excel ,
opens the file
runs the macro
and exits

My problem is that sometimes excel throughs message boxes and waits for user inputs , and since this whole process is a batch , there is no human to click the message box and the whole process is stuck.

Is there a way , by which we can trap the message box thrown by excel , check the message in it and do some action and proceed with the next job,

(I can only imagine that there has to be a back ground process which looks out for message boxes and does some action)

I would look forward to your answers

Many Thanks ,

Gaurav