Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Leftover Workbooks with Opening Excel in IE Browser Window

I'm experiencing a problem when I open a workbook from Internet Explorer (for
example, clicking on a hyperlink to a .xls file) and my system is configured
to open Excel in a brower window. If Excel is opened before I click the link
in IE then when I close the browser window that was displaying the workbook,
an empty workbook named "Object" is left in Excel. Each time and Excel link
is opened in IE and then the browser window is closed, additional workbooks
named "Object2", "Object3", ... are left open.

I tracked the issue to a COM add-in (disabling the add-in caused the problem
to go away) and in particular creating an Excel event handler in the add-in.
Note: it doesn't appear to matter which event handler is created and the
handler doesn't even need to contain any code to make the issue appear. Just
defining an event handler in VBA doesn't appear to cause the problem.

Has anyone seen this problem or know anything about how to resolve it?

It's easy to produce the problem by creating a new Office COM add-in using
the Visual Studio project wizard, then add an event handler:

// I added the reference to Office PIA for Excel
using Excel = Microsoft.Office.Interop.Excel;

// This code was generated by the wizard
public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application;
addInInstance = addInInst;

// I added this code
Excel.Application excelApp = (Excel.Application)applicationObject;
excelApp.WorkbookOpen += new
Microsoft.Office.Interop.Excel.AppEvents_WorkbookO penEventHandler(excelApp_WorkbookOpen);
}

// I added the empty event handler
private void excelApp_WorkbookOpen(Microsoft.Office.Interop.Exc el.Workbook Wb)
{
}
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying text from a Browser window into Excel Don[_2_] New Users to Excel 1 March 20th 07 05:23 PM
Workbooks opening in browser window Richard Excel Discussion (Misc queries) 0 January 17th 07 04:52 PM
Launch new browser window from an excel web page Hal Anderson Excel Discussion (Misc queries) 2 January 20th 06 02:10 AM
Hyperlinks opening in new appication/browser window Richard Excel Discussion (Misc queries) 0 June 6th 05 01:36 PM
Opening browser window Abhay Parekh Excel Programming 1 December 4th 03 08:01 PM


All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"