View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Michael D. Reed Michael D. Reed is offline
external usenet poster
 
Posts: 8
Default How do i open a new instance Excel?

Using create object did not work. I may be in the wrong group but this is
what I am doing.
I am opening an Excel workbook from a VB.NET program using:
_myApplaction = New Excel.Application
_myWorkbook = ._myApplaction.Workbooks.Open(ExcelWorkbookPath)
I also tried
_myApplaction = CreateObject("Excel.Application")

_myWorkbook = ._myApplaction.Workbooks.Open(ExcelWorkbookPath)

In both cases if I open a workbook file it uses the running Excel instance
you can see this by looking at the Windows menu, both files are listed there.

If I open Excel and then open the workbook, it is in a new instance in each
instance the Windows menu will only show one workbook.
Is there a way to tell excel to open a new instance when a workbook file is
opened, preferably programmability.

--
Mike Reed


"Fred" wrote:

Micheal try,

Dim xlApp as Excel.Application
set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Open FileName:="C:\Book1.xls"


Fred

"Michael D. Reed" wrote in message
...
How do I open excel workbook in its own instance of Excel. When I have
Excel
running and open another Excel workbook file (with an .xls extension) it
is
opened in the instance I have running. So, when I exit Excel both
workbooks
are closed. This is a problem when for a program that has a hidden Excel
workbook running. If I start another Excel file, it uses the instance of
Excel the program is using. This causes a problem for the program because
I
shows the hidden file and will close it if the instance is closed. If I
open
an instance of Excel then load the file, I get new instance of Excel. Is
there a way to tell the system to open a new Excel file in a new instance?
--
Mike Reed