Solved

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

Posted on 1998-10-06
3
142 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
  • 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

Technology Partners: 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!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 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…

756 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