?
Solved

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

Posted on 1998-10-06
3
Medium Priority
?
146 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 20 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

650 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