Opening multiple workbooks in Excel through VB

N

Nick.Korynski

I need to open multiple excel files through my code in VB. Does a
quicker runtime result from opening up one instance of excel and then 5
workbooks in that application as opposed to opening 5 applications of
excel?

e.g.

public xlApp as excel.application
public xlBook as excel.workbook
public xlBook2 as excel.workbook
public xlBook3 as excel.workbook
public xlBook4 as excel.workbook
public xlBook5 as excel.workbook

vs.

public xlApp as excel.application
public xlApp2 as excel.application
public xlApp3 as excel.application
public xlApp4 as excel.application
public xlApp5 as excel.application

Thanks,

Nick
 
J

Jon Peltier

Just as important is what are you doing with the workbooks? I'd think it
would be easier to use a single instance, especially if there's any
interaction between the workbooks.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 

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