unembedding Excel in Internet Explorer RRS feed

  • Question

  • I have an Excel file that acts as a front-end for an Access database. I have written few VB codes to export some of the sheets and charts to a new excel file. This was required because the main Excel file cannot be distributed or emailed to other locations as it is the front-end and has a ADODB link to the Access database. So I used the following code to export just  the required sheets to a new plain Excel file without any ADODB links.

    Sheets(Array("Sheet1", "Chart1")).Copy

    This code works great and Sheet1 and Chart1 are copied to a new Workbook and the  user has the option to save it and distribute the file as per his needs.

    But the problem that I am facing is that, the main excel file is posted in the company's intranet and is accessible only through Internet Explorer. So whenever anybody tries to open this file then it gets opened inside Internet Explorer (embedded). After that the code that I just mentioned above doesn't work properly. It won't export the sheets into a new Excel file but instead copies themselves into the same file as Sheet1(1) and chart1(1).

    Sheets(Array("Sheet1", "Chart1")).Copy after:-NewWorkbook

    I tried the above "after" option also but didn't work and instead Excel crashed. I suspect this as a bug and have reported the error to Microsoft.

    Any ideas, how to unembedd Excel from IE or someother ideas that I can try?


    Friday, August 11, 2006 9:43 PM