+ Reply to Thread
Results 1 to 3 of 3

moving between Excel sessions

  1. #1
    Registered User
    Join Date
    07-21-2005
    Posts
    1

    Post moving between Excel sessions

    Our financial system can export via a batch file a number of separate
    reports that then need formatting and printing before each one is closed
    without saving it.

    I can do all of the formatting and closing down, but I am having a problem
    with activating the next workbook because it appears that each workbook
    created is using a separate session of excel.

  2. #2
    Registered User
    Join Date
    04-25-2005
    Posts
    99
    You'll need to implement some API calls to get a handle on the other application.
    This can be a big pain, but if you understand API calls, it can be achieved. I have some code that does this, but it is extremely lengthy and very purpose specific, so I doubt it would be of any use to you.

    Try these links:
    informit.com
    Tek Tips

    There are 2 links in that tek-tips thread:
    Tek-Tips 1
    tek-tips 2


    Hope this will provide you with some assistance and/or guidance.

    DejaVu

  3. #3
    NickHK
    Guest

    Re: moving between Excel sessions

    chasfox,
    As long as there no specific order in which you need to process these files
    and the only instances of Excel are opened by this batch file, how about:
    Dim NextXL as Excel.Application
    Set NextXL=GetObject("Excel.Application")
    Do Until NextXL=Nothing
    .....process
    NextXL.Quit
    Loop

    NickHK

    "chasfox" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Our financial system can export via a batch file a number of separate
    > reports that then need formatting and printing before each one is
    > closed
    > without saving it.
    >
    > I can do all of the formatting and closing down, but I am having a
    > problem
    > with activating the next workbook because it appears that each
    > workbook
    > created is using a separate session of excel.
    >
    >
    > --
    > chasfox
    > ------------------------------------------------------------------------
    > chasfox's Profile:

    http://www.excelforum.com/member.php...o&userid=25467
    > View this thread: http://www.excelforum.com/showthread...hreadid=389053
    >




+ 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