ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening multiple workbooks in Excel through VB (https://www.excelbanter.com/excel-programming/360610-opening-multiple-workbooks-excel-through-vbulletin.html)

[email protected]

Opening multiple workbooks in Excel through VB
 
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


Jon Peltier

Opening multiple workbooks in Excel through VB
 
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/
_______


wrote in message
oups.com...
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





All times are GMT +1. The time now is 06:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com