How can I create several instances of Excel ?

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
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top