|
-
Nov 7th, 2001, 01:57 PM
#1
Thread Starter
New Member
How to determine if Excel is runing
I usually create an excel application from VB as follows:
Private myXLBook As Object
Set myXLBook = CreateObject("excel.application")
myXLBook.Visible = True
myXLBook.Workbooks.Add
However, instead of this I want to check if excel is already running and if it is I want to create a workbook instead of another excel application. How do you do this?
Thanks in advance
-
Nov 7th, 2001, 02:53 PM
#2
Try GetObject instead of CreateObject - GetObject checks to see if the object is instantiated. If it is, it uses the existing object.
-
Nov 7th, 2001, 03:19 PM
#3
Thread Starter
New Member
Excellent Jim thanks a lot !
That works even if excel is not runing !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|