LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default How do I get one instance of Excel to communicate with another instance?

Greetings,

Your approach does seem too complicated. If you have both add-ins
installed and your project has references to both add-ins, then code in
your project can invoke procedures from either add-in and thus
coordinate them. You could do a search for "Solver" in this newsgroup
since that is an add-in which is frequently invoked by other code and
some of the code fragments you find might give you an idea of how to
invoke add-ins from VBA.

If you are using the raw code in Evolver (as opposed to using Evolver
as an add-in) then it might be as simple as adding a reference to
Ptestpro to your project with the Evolver code. Go to tools -
references.

Hope this helps. If it doesn't - don't give up. I'd be surprised if you
really need to communicate between difference instances of Excel.

-John Coleman

p.s. What is Evolver? Sounds like a genetic algorithm optimization
tool.

wrote:
I want to run 2 versions of Excel that communicate with each other.
This seems unusual, but let me explain why:

I have purchased a addin called "Evolver" which I want to run a macro
that runs another addin (that I've also purchased) called "Ptestpro".
"Ptestpro" has a menu that it adds to Excel.

The problem is that Excel does not seem to allow this. One addin
cannot run another addin, not even by sending keystrokes (using
"sendkeys") to the menu of the other addin.

So the only solutions I can think of a
1. copy all the code of "Ptestpro" to a spreadsheet that is being
processed by "Evolver". (I am unclear as to whether this would help)
2. Run two instances of Excel, one of which has the "Evolver" addin,
the other which has the "PtestPro" addin. Evolver in one instance
would send a message to run "Ptestpro" in the other instance. When
"Ptestpro" is done, Ptestpro writes an answer to a cell in its instance
of Excel. This answer would have to be retrieved somehow by the Excel
running "Evolver".
so this breaks down to three parts:
a) Excel1 runs a macro in Excel2
b) Excel1 waits for Excel2 to finish running the macro
b) Excel 1 retrieves a value from a cell in Excel2

My question is, is this the way to go, and if so, what the code look
like?

Or is this a too complicated way of solving this problem?
Thanks,
HA


 
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
How to get all Excel instance Xav[_2_] Excel Programming 2 December 24th 05 04:55 PM
copying from another instance of excel Paul Excel Programming 7 December 31st 04 12:01 AM
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 04:52 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"