Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: RefEdit control does not work when Excel is embedded in some containers


View products that this article applies to.

Symptoms

When a Microsoft Office Excel worksheet is embedded in an object linking and embedding (OLE) container and is in-place active, and a macro shows a Visual Basic for Applications (VBA) dialog box that uses the RefEdit control, the RefEdit control may not work, and you may be unable to switch back to the sheet to select cells.

The problem occurs when Excel is embedded in some applications (such as Microsoft Office Word), but may not occur in other applications.

↑ Back to the top


Cause

When Excel is in-place active in an external application and a VBA dialog box is displayed, Excel takes focus away from that application and causes a WM_ACTIVATEAPP message to be sent to the main window of the host application. The host notifies any active object of this event. In the case of Excel, this temporarily disables the object window, making it unavailable to the RefEdit control on the VBA dialog box. The control cannot switch back to the sheet to allow the user to select cells.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. There are currently no workarounds for this issue.

↑ Back to the top


More information

When Excel is not embedded and a VBA dialog box is displayed, Excel does not change thread focus and the problem does not occur. Also, if an OLE container does not call IOleInPlaceActiveObject::OnFrameWindowActivate when it receives a WM_ACTIVATEAPP message, the problem does not occur. This is not a valid workaround, however, because this notification is required, and failure to notify the object server of frame state changes can lead to other improper OLE behavior.

↑ Back to the top


References

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
281542 RefEdit control does not work on form in a Com Add-In in Excel

↑ Back to the top


Keywords: KB313102, kbpending, kbinplaceact, kbbug

↑ Back to the top

Article Info
Article ID : 313102
Revision : 8
Created on : 5/11/2007
Published on : 5/11/2007
Exists online : False
Views : 331