Home All Groups Group Topic Archive Search About

Referencing to a specific instance of a program

Author
10 Jun 2010 9:08 AM
Lucio Menci
Hi all,

I have .Net 2005 Pro.
I want to create a VB application where I can manage Excel.
From Excel I want to launch that application, this application have to
start, recognize witch instance of Excel was the launcher and write something
into some cells.

Sometimes I noted that I have more than one instances of running Excel.
If I use GetObject I cannot choose witch instance of Excel I have to manage.
If I create a DLL (exposed or not via COM), I cannot include that library in
a Excel macro (why? Or, better, How can I create a library includable into
Excel?)

There is another way to access to an external program except the GetObject
function?

Author
10 Jun 2010 10:24 PM
Robert Ellis
You will probably have to look at one or more Win32 API calls if you want to
do exactly as you propose.

It is not fun. Especially from VB.


Show quoteHide quote
"Lucio Menci" <LucioMe***@discussions.microsoft.com> wrote in message
news:03D4B3E2-BC58-49A2-AD27-9C76613BD244@microsoft.com...
> Hi all,
>
> I have .Net 2005 Pro.
> I want to create a VB application where I can manage Excel.
> From Excel I want to launch that application, this application have to
> start, recognize witch instance of Excel was the launcher and write
> something
> into some cells.
>
> Sometimes I noted that I have more than one instances of running Excel.
> If I use GetObject I cannot choose witch instance of Excel I have to
> manage.
> If I create a DLL (exposed or not via COM), I cannot include that library
> in
> a Excel macro (why? Or, better, How can I create a library includable into
> Excel?)
>
> There is another way to access to an external program except the GetObject
> function?
Author
14 Jun 2010 7:53 AM
Lucio Menci
Uhm...
Do you know some API calls that supply a COM access? I cannot find anyone...

And the way to include a VB2005 library into a VBA project of Excel?

Show quoteHide quote
"Robert Ellis" wrote:

>
> You will probably have to look at one or more Win32 API calls if you want to
> do exactly as you propose.
>
> It is not fun. Especially from VB.
>
>
> "Lucio Menci" <LucioMe***@discussions.microsoft.com> wrote in message
> news:03D4B3E2-BC58-49A2-AD27-9C76613BD244@microsoft.com...
> > Hi all,
> >
> > I have .Net 2005 Pro.
> > I want to create a VB application where I can manage Excel.
> > From Excel I want to launch that application, this application have to
> > start, recognize witch instance of Excel was the launcher and write
> > something
> > into some cells.
> >
> > Sometimes I noted that I have more than one instances of running Excel.
> > If I use GetObject I cannot choose witch instance of Excel I have to
> > manage.
> > If I create a DLL (exposed or not via COM), I cannot include that library
> > in
> > a Excel macro (why? Or, better, How can I create a library includable into
> > Excel?)
> >
> > There is another way to access to an external program except the GetObject
> > function?
>
>
> .
>