Solved

Referencing a specific Excel Session by PID

Posted on 2004-08-05
8
134 Views
Last Modified: 2010-05-02
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
Comment
Question by:cartti
  • 3
8 Comments
 
LVL 11

Accepted Solution

by:
ajaikumarr earned 200 total points
Comment Utility
0
 
LVL 11

Expert Comment

by:ajaikumarr
Comment Utility
0
 
LVL 7

Expert Comment

by:_agj_
Comment Utility
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
 
LVL 2

Author Comment

by:cartti
Comment Utility
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
 
LVL 11

Expert Comment

by:ajaikumarr
Comment Utility
Hai,

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

Bye
Ajai
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now