+ Reply to Thread
Results 1 to 2 of 2

Opening multiple workbooks in Excel through VB

  1. #1

    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


  2. #2
    Jon Peltier
    Guest

    Re: 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/
    _______


    <[email protected]> wrote in message
    news:[email protected]...
    >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
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1