
GetObject() not telling me when the COM application is already running
GetObject( , "class") is not seeing my application when it is already
running.
I am using Excel 2000 in Windows 2000 professional.
In my script, GetObject() always returns a 429 and then creates a new
version using CreateObject. Here is my code to see if an application (my
own) is running-
=================================
' try to locate reference to running application
Dim SigApp As Object
On Error Resume Next
Set SigApp = GetObject(, "Foobar.Application")
If (Err.Number = 429) Then
' create a new Foobar object
On Error GoTo ERR_OUT
Set SigApp = CreateObject("Foobar.Application")
ElseIf (Err.Number <> 0) Then
' report any other type of error
MsgBox "Error: " & Err.Description
Exit Sub
End If
=================================
All help is appreciated,
Thanks,
- Chuck
--
Chuck Gebben
EDX Engineering, Inc.