Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

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

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
monalisa
Asked:
monalisa
  • 2
1 Solution
 
fguerreiro_inixCommented:
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
 
monalisaAuthor Commented:
what will be the error number it there is no object
0
 
fguerreiro_inixCommented:
Check it manually with a msgbox.

Hope this helps
Regards
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now