Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default multiple instances

usualy, all active [open] workbooks belong to the *same* excel app instance,
but sometimes [for example, when working with dbf files] dbf files appear to
be opened in *new* instance, not in one allready running, so i can not share
macros contained in that other excel instance.

this usualy happens when excel file opened with "start file.dbf", when
opened from excel app with "ope ..." it is ok.

i am interested is there some way to examine is there multiple ecxel app
instances, and how to access files of one instance from another [especially
when invoking macros or addressing cells in formulas]?

thnx


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default multiple instances


Sometimes one of these works:

Tools|Options|General|Ignore other applications (uncheck it)

--- or ---

Close Excel and
Windows Start Button|Run
excel /unregserver
then
Windows Start Button|Run
excel /regserver

The /unregserver & /regserver stuff resets the windows registry to excel's
factory defaults.

But when I start excel via the windows start button, I always get another
instance.

sali wrote:

usualy, all active [open] workbooks belong to the *same* excel app instance,
but sometimes [for example, when working with dbf files] dbf files appear to
be opened in *new* instance, not in one allready running, so i can not share
macros contained in that other excel instance.

this usualy happens when excel file opened with "start file.dbf", when
opened from excel app with "ope ..." it is ok.

i am interested is there some way to examine is there multiple ecxel app
instances, and how to access files of one instance from another [especially
when invoking macros or addressing cells in formulas]?

thnx


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default multiple instances

i've just noticed that "sometimes" i have multiple instances, wasn't aware
of exact steps to replicte behaviour.

if that behaviour is completely legal, is there some mean to obtain
communication between multiple instances?

thnx

"Dave Peterson" wrote in message
...

Sometimes one of these works:

Tools|Options|General|Ignore other applications (uncheck it)

--- or ---

Close Excel and
Windows Start Button|Run
excel /unregserver
then
Windows Start Button|Run
excel /regserver

The /unregserver & /regserver stuff resets the windows registry to excel's
factory defaults.

But when I start excel via the windows start button, I always get another
instance.

sali wrote:

usualy, all active [open] workbooks belong to the *same* excel app

instance,
but sometimes [for example, when working with dbf files] dbf files

appear to
be opened in *new* instance, not in one allready running, so i can not

share
macros contained in that other excel instance.

this usualy happens when excel file opened with "start file.dbf", when
opened from excel app with "ope ..." it is ok.

i am interested is there some way to examine is there multiple ecxel app
instances, and how to access files of one instance from another

[especially
when invoking macros or addressing cells in formulas]?

thnx


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default multiple instances

I've never seen a way to reliably do it.

sali wrote:

i've just noticed that "sometimes" i have multiple instances, wasn't aware
of exact steps to replicte behaviour.

if that behaviour is completely legal, is there some mean to obtain
communication between multiple instances?

thnx

"Dave Peterson" wrote in message
...

Sometimes one of these works:

Tools|Options|General|Ignore other applications (uncheck it)

--- or ---

Close Excel and
Windows Start Button|Run
excel /unregserver
then
Windows Start Button|Run
excel /regserver

The /unregserver & /regserver stuff resets the windows registry to excel's
factory defaults.

But when I start excel via the windows start button, I always get another
instance.

sali wrote:

usualy, all active [open] workbooks belong to the *same* excel app

instance,
but sometimes [for example, when working with dbf files] dbf files

appear to
be opened in *new* instance, not in one allready running, so i can not

share
macros contained in that other excel instance.

this usualy happens when excel file opened with "start file.dbf", when
opened from excel app with "ope ..." it is ok.

i am interested is there some way to examine is there multiple ecxel app
instances, and how to access files of one instance from another

[especially
when invoking macros or addressing cells in formulas]?

thnx


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default multiple instances

But there may be a way to do this. Maybe someone who knows windows APIs will
chime in.

Dave Peterson wrote:

I've never seen a way to reliably do it.

sali wrote:

i've just noticed that "sometimes" i have multiple instances, wasn't aware
of exact steps to replicte behaviour.

if that behaviour is completely legal, is there some mean to obtain
communication between multiple instances?

thnx

"Dave Peterson" wrote in message
...

Sometimes one of these works:

Tools|Options|General|Ignore other applications (uncheck it)

--- or ---

Close Excel and
Windows Start Button|Run
excel /unregserver
then
Windows Start Button|Run
excel /regserver

The /unregserver & /regserver stuff resets the windows registry to excel's
factory defaults.

But when I start excel via the windows start button, I always get another
instance.

sali wrote:

usualy, all active [open] workbooks belong to the *same* excel app

instance,
but sometimes [for example, when working with dbf files] dbf files

appear to
be opened in *new* instance, not in one allready running, so i can not

share
macros contained in that other excel instance.

this usualy happens when excel file opened with "start file.dbf", when
opened from excel app with "ope ..." it is ok.

i am interested is there some way to examine is there multiple ecxel app
instances, and how to access files of one instance from another

[especially
when invoking macros or addressing cells in formulas]?

thnx

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default multiple instances

"Dave Peterson" wrote in message
...
But there may be a way to do this. Maybe someone who knows windows APIs

will
chime in.


I looked into this a while ago, I'm not aware of any API's that directly do
that though API's assist in the overall process.

If a workbook is uniquely open in a given instance then the following
normally works

set xlApp = GetObject(sFullname).Parent

This of course requires one instance knows the fullname of some file (even
an addin) uniquely open in another instance. If this scenario applies to the
OP it might be pretty straightforward, depending on which instance is
required to control the other and assuming it can be determined there will
be multiple instances running.

My generic method of referencing all unknown instances goes something like
this -

Enumerate windows (API) and get all Excel window handles. At the same time
get the names of any unsaved BookX in each instance - "X" will be a unique
number.

If an instance does not include an unsaved BookX - bring the instance to the
top (API) and add a new workbook with DDE using (say) Word, hide the new
BookX for future use.

With GetObject BookX set an array of xlApp refs & withevents class's to each
instance.

Regards,
Peter T


Dave Peterson wrote:

I've never seen a way to reliably do it.

sali wrote:

i've just noticed that "sometimes" i have multiple instances, wasn't

aware
of exact steps to replicte behaviour.

if that behaviour is completely legal, is there some mean to obtain
communication between multiple instances?

thnx

"Dave Peterson" wrote in message
...

Sometimes one of these works:

Tools|Options|General|Ignore other applications (uncheck it)

--- or ---

Close Excel and
Windows Start Button|Run
excel /unregserver
then
Windows Start Button|Run
excel /regserver

The /unregserver & /regserver stuff resets the windows registry to

excel's
factory defaults.

But when I start excel via the windows start button, I always get

another
instance.

sali wrote:

usualy, all active [open] workbooks belong to the *same* excel app
instance,
but sometimes [for example, when working with dbf files] dbf files
appear to
be opened in *new* instance, not in one allready running, so i can

not
share
macros contained in that other excel instance.

this usualy happens when excel file opened with "start file.dbf",

when
opened from excel app with "ope ..." it is ok.

i am interested is there some way to examine is there multiple

ecxel app
instances, and how to access files of one instance from another
[especially
when invoking macros or addressing cells in formulas]?

thnx

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson



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
add multiple x values to multiple instances of y coordinate evrk Charts and Charting in Excel 0 January 18th 11 10:57 PM
Multiple instances of Excel (Multiple workbooks) Shane Setting up and Configuration of Excel 3 November 13th 09 05:07 PM
Create list of unique instances from list of multiple Instances Dishon Excel Worksheet Functions 0 March 3rd 08 10:46 AM
Multiple instances of lookup value SGT Buckeye Excel Discussion (Misc queries) 3 September 23rd 07 03:00 AM
Multiple instances Neil Levy Excel Discussion (Misc queries) 2 June 23rd 07 01:13 AM


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

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"