Solved

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

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

810 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