ON ERROR

  • Thread starter Thread starter Honza
  • Start date Start date
H

Honza

I have a following problem.
From Batch file runs VBS from VBS runs Excel and its Macro
code in VBA creates pivot table and at the and close
itself.
Sometimes appears an Error: Windows with ERROR information
and Check box "Recover my work and restart Excel Two
Bottoms "Send Error Report" and "Don't Send"
This cause that The Excel stay in this state and it needs
Manual interaction.

My questions are:
Why this described message appeared Even though I have
switched on "ON ERROR GOTO .." in VBA Macro ?
How to manage to do not display this Error message and
control errors in VBA?
 
On Error only handles trappable errors. If Excel crashes, that isn't
trappable by VBA.

Regards,
Tom Ogilvy
 
Thanks. I see.
I need to manage kill the excel to my main BATCH file could continue
with Another Excel task ...
There should run another check program which would check if Excel does
not crashed. If so, then kill the Excel.

How I can control that Excel crashed - Status of excel?

Thanks for help.

Regards
Honza
 
There is a whole process:
1. The Main Batch run vbs
2. vbs opens MainExcel.xls and run macro with passed
parameter
3. in MainExcel.xls there are all macros to create pivot.
4. At the end the MainExcel.xls closes
5. End of cycle - continue by 1. - run another vbs from
the bat

Regards
Jan Kypta
 
Back
Top