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. -- chasfox ------------------------------------------------------------------------ chasfox's Profile: http://www.excelforum.com/member.php...o&userid=25467 View this thread: http://www.excelforum.com/showthread...hreadid=389053 |
moving between Excel sessions
You'll need to implement some API calls to get a handle on the othe application. This can be a big pain, but if you understand API calls, it can b achieved. I have some code that does this, but it is extremely length and very purpose specific, so I doubt it would be of any use to you. Try these links: 'informit.com (http://www.informit.com/articles/art...?p=366892&rl=1) 'Tek Tips' (http://www.tek-tips.com/viewthread.c...1052860&page=1 There are 2 links in that tek-tips thread: 'Tek-Tips 1' (http://www.tek-tips.com/faqs.cfm?fid=3383) 'tek-tips 2' (http://www.tek-tips.com/viewthread.cfm?qid=393757) Hope this will provide you with some assistance and/or guidance. DejaV -- DejaV ----------------------------------------------------------------------- DejaVu's Profile: http://www.excelforum.com/member.php...fo&userid=2262 View this thread: http://www.excelforum.com/showthread.php?threadid=38905 |
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" wrote in message ... 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 |
All times are GMT +1. The time now is 08:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com