Solved

creating an instance of Excel application if it is not already running

Posted on 1998-10-06
3
144 Views
Last Modified: 2010-04-30
I am using excel as ole object. I want to make use of the existing instance ofExcel application if an instance is running. Else I have to create a instance. How can I check whether an excel application is already running on the system, so that I can make use of that instance.
0
Comment
Question by:monalisa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
fguerreiro_inix earned 10 total points
ID: 1438374
Use GetObject function. If no instance is running then an error ocurs, (check the error number) you must treat it and use now Createobject function.

It works for me

Hope this helps
Regards
0
 

Author Comment

by:monalisa
ID: 1438375
what will be the error number it there is no object
0
 
LVL 3

Expert Comment

by:fguerreiro_inix
ID: 1438376
Check it manually with a msgbox.

Hope this helps
Regards
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

691 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