Board index » delphi » Excel 'disappears'

Excel 'disappears'

Hi,

we use the D5-Components to automate Excel97.

After showing Excel (Visible=True) we can navigate in the created
Workbooks and Sheets, but sometimes -doing nothing special- Excel
disappears. Excel is still open but only visible in the task-manager.

We can reanimate this Excel-Thread by creating another new Workbook with
our Delphi-program.

Does anyone know how wen can avoid this effect?

Thank's

Karsten.

 

Re:Excel 'disappears'


<<Karsten Hassel:
sometimes -doing nothing special- Excel
disappears.

Quote

I can't remember seeing this. Can you say
any more about the 'nothing special'?

--
Deborah Pate

Re:Excel 'disappears'


Quote
Deborah Pate wrote:
> I can't remember seeing this. Can you say
> any more about the 'nothing special'?

There were several cases where Excel disappeared:
- only clicking on a cell in the active worksheet
- changing the active worksheet
- changing the active workbook
- ...
In all cases we've done 'nothing special', we only navigated in Excel.
Is it may neccessary to install all service packs for Office97 ?
We are using Win NT SR 6a.

With best regards,

Karsten.

Re:Excel 'disappears'


<<Karsten Hassel:
In all cases we've done 'nothing special', we only navigated
in Excel.

Is it may neccessary to install all service packs for Office97 ?

Quote

It might be worth a try, because I don't know anything
else to suggest. :( I suppose you have checked that there
are no strange macros running, etc.?

--
Deborah Pate

Re:Excel 'disappears'


Hi,

the following answer to the same question at www.entwickler.com solves
the problem (sorry, it's german).
Thanks to Andreas Kosch.

Karsten.

**********************************************

Andreas Kosch - 08:14am May 4, 2000 MEZ (#1 von 1)

Hallo,
Microsoft hat zu diesem Problem die folgende Warnung ver?ffentlich: "If
you are making the Automation server visible so that the user can
interact with the server, insure that you are properly giving the user
control of the application before your Automation code ends. Some
Automation clients, such as Microsoft Excel, require that you give the
user control of the application by setting a property, the UserControl
property. When automating Microsoft Excel, if you make the application
visible without setting the UserControl property to True, the reference
count for the application is not properly decremented.".

Man muss also Visible und UserControl immer zusammenh?ngend setzen:

xlApp.Visible := True
xlApp.UserControl := True

Other Threads