I have a program - VFP9 Sp1 - which creates an Excel file.
In the program, when the sheet is ready I create subtotals using the
following code:
oSelected.Subtotal(1, -4157, @laArray, .f., .F., 1).
If I run this program 1-2 times per day I do not have any problem.
But after 4-5 runs I have the following error:
OLE error code 0x80010105: The server threw an exception.

Could anyone help me what can be the mistake?
Many thanks.
--
Sandor

Re: OLE error by Ook

Ook
Wed Jun 20 12:18:39 CDT 2007

Use task manager to see if you have multiple instances of Excel
running. If you are not careful, your code will not actually terminate
the excel instance. After too many instances are running, you will
start to get errors.

On Jun 20, 4:04 am, Sandor Hajdu
<SandorHa...@discussions.microsoft.com> wrote:
> I have a program - VFP9 Sp1 - which creates an Excel file.
> In the program, when the sheet is ready I create subtotals using the
> following code:
> oSelected.Subtotal(1, -4157, @laArray, .f., .F., 1).
> If I run this program 1-2 times per day I do not have any problem.
> But after 4-5 runs I have the following error:
> OLE error code 0x80010105: The server threw an exception.
>
> Could anyone help me what can be the mistake?
> Many thanks.
> --
> Sandor