How can I create several instances of Excel ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

How can I create several instances of Excel ? eventually 2-3 in one go ?

Usually, I do
Set oXL = WScript.CreateObject("Excel.Application")
followed by
oXL.Workbooks.Add
but, if the user has already Excel open, then my data is put in his current
workbook, no good

The should be something like oXL.Workbooks.Create but can't find it

Thanks
Raymond
 
According to help, CreateObject should do the job:

Use CreateObject when there is no current instance of the object. If an
instance of the object is already running, a new instance is started, and an
object of the specified type is created. To use the current instance, or to
start the application and have it load a file, use the GetObject function.

It is unclear why you would want more than one instance with the attendant
overhead.

Regards,
Tom Ogilvy
 
Back
Top