Microsoft KB Archive/96465

= ACC: OLE Microsoft Excel or Microsoft Word Do Not Close When Form Is Closed =

Article ID: 96465

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Access 1.0 Standard Edition
 * Microsoft Access 1.1 Standard Edition
 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q96465



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
Microsoft Access does not close some OLE servers if you close a table, a form, or a report while editing an OLE object embedded in it.



STATUS
This behavior is by design.



MORE INFORMATION
Microsoft Access does not close Multiple Document Interface (MDI) applications that do not support in-place activation, even if they were started as an OLE server for an object stored in Microsoft Access. An MDI application can edit and display multiple documents at once.

Microsoft Excel version 3.0 and Microsoft Word version 2.0 for Windows are examples of applications that remain open if you double-click an embedded object in Microsoft Access to activate it, and then switch back to Microsoft Access and close the table, form, or report without closing the embedded object.

Steps to Reproduce Behavior

 * 1) Open the sample database Northwind.mdb (or Nwind.mdb in earlier versions).
 * 2) Create a new form not based on a table or query and open it in Design view.
 * 3) On the Insert menu, click Object (or on the Edit menu, click Insert Object in versions 1.x and 2.0).
 * 4) Select Microsoft Excel Worksheet in the Object Type box, and then click OK.
 * 5) When a new worksheet opens in Microsoft Excel, type some sample text in a few cells, and then exit Microsoft Excel.
 * 6) Set the following properties of the new embedded object control on the form:

Enabled: Yes Locked: No
 * 1) Save the form as frmExcel and close it.
 * 2) Open the frmExcel form in Form view.
 * 3) Double-click the embedded Excel worksheet object that you just created.
 * 4) When Microsoft Excel opens and displays the worksheet, minimize Microsoft Excel and then close the Microsoft Access form.
 * 5) Note that Microsoft Excel is still open. You must activate the Microsoft Excel window and quit the program manually.

If you repeat these steps with applications such as Paintbrush, Microsoft Draw, or Note-It (these are not MDI applications), you will note that these servers close when the form closes.

Keywords: kbprb KB96465

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.