>>For most of my recent reports, I use Excel as my main reporting tool (using a class similar to download #
9991 - which can create text-mode and Excel reports).
>>
>>When I produce a single report (a single Excel workbook), and then close Excel, there is an unsightly error message, stating that Excel has detected an error and must close (but I wanted to close it anyway, groan). Nothing of the sort happens if I open two or more reports (in separate Excel sheets), and then close Excel. This only happens if a single Excel report is generated.
>>
>>Does this sound familiar to anybody? Any idea what I could do about it?
>
>What is the command you are using to close Excel
I don't close it through a command. I keep it open, so that the user can see a report, which is sent to Excel via Automation. The error appears when the user closes Excel manually - and only if a single Excel report was produced.
> and what exactly is the error message?
I will have to check that when I am back at work. Something about Excel doing an invalid operation, and Windows having to close it.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)