Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to set a new Excel instance as the 'default'

Is there a way I can make a new instance of Excel
the 'default' Excel process? I know how to get the window
handle of my new Excel instance, and I've tried using the
SetWindowPos api to change the window order, but that had
no effect.

I have written a program in Access 2000 which involves the
creation of a new instance of Excel. The program basically
runs as follows:
.. A new Excel application is opened invisible to the user
.. An Excel workbook is opened and edited
.. The edited worksheet is imported into another Access
database using the Transferspreadsheet method
.. The Excel workbook is closed without saving

The program works fine EXCEPT if an existing instance of
Excel is open before running my program; In which case
the 'Transferspreadsheet' method in Access (as best as I
can describe) uses the existing Excel process to try and
do the import of the worksheet. Because my 'new' instance
of Excel already has the workbook I'm trying to import
open for editing, the workbook will be opened read-only in
the EXISTING Excel instance, and subsequently imported
into Access in the pre-edited form.

I can work around this problem by changing the methodology
of my program, but I would still like to know if there is
a way I can make a new instance of Excel the 'default'
Excel process. Any help regarding this question would be
appreciated.

Regards

Lachlan Sharp
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - New Instance JMay Excel Discussion (Misc queries) 4 November 28th 09 04:55 PM
run a single instance of excel Teamlevy Excel Discussion (Misc queries) 8 December 4th 08 04:31 PM
opening a new instance of Excel gb4 Setting up and Configuration of Excel 0 April 10th 08 04:48 PM
Excel Instance FuzzyLogic Excel Programming 2 February 21st 04 03:41 PM
Second instance of Excel Dom[_2_] Excel Programming 1 August 25th 03 05:37 PM


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"