• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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