• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 153
  • Last Modified:

Referencing a specific Excel Session by PID

If I have two or more Excel sessions running, how do I set a variable object reference to a specific Excel session? Using the Process ID of an Excel session is preferable.

Thanks in advance.
0
cartti
Asked:
cartti
  • 3
1 Solution
 
ajaikumarrCommented:
0
 
_agj_Commented:
if u have yourself opened the excel sessions from code, u shud have handles to them.

psapi is the option if u want to get the process id and do stuff..

state ur req. more clearly...there might be an easier way out.
0
 
carttiAuthor Commented:
Sorry if my question was unclear. I would like to get a specific object reference of one of the Excel sessions (perhaps by the PID) through a Visual Basic application. e.g. GetObject() is not sufficient as it gets the first instance of Excel that was created.
0
 
ajaikumarrCommented:
Hai,

My 1st link has the same code which he requested...

Bye
Ajai
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now