Message 1 of 4
GetObject. need Help

Not applicable
08-13-2003
09:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Try this again. CreateObject!!
Need help from VB Guru. I am trying to create the Inventor.Application object. I get an error that says
"ActiveX component can't create object" I have the reference set to the Autodesk Inventor library. Here is the test sample code that fails:
Dim oApp As Inventor.Application
On Error Resume Next
Set oApp = GetObject(, "Inventor.Application")
If Err Then
retval = MsgBox("Inventor Must be Running. Would You Like to Start Inventor?", vbQuestion + vbYesNo, "Start Inventor")
If retval = 6 Then
Set oApp = Nothing
Set oApp = CreateObject("Inventor.Application")
If Err Then
End
End If
Else
End
End If
End If
Need help from VB Guru. I am trying to create the Inventor.Application object. I get an error that says
"ActiveX component can't create object" I have the reference set to the Autodesk Inventor library. Here is the test sample code that fails:
Dim oApp As Inventor.Application
On Error Resume Next
Set oApp = GetObject(, "Inventor.Application")
If Err Then
retval = MsgBox("Inventor Must be Running. Would You Like to Start Inventor?", vbQuestion + vbYesNo, "Start Inventor")
If retval = 6 Then
Set oApp = Nothing
Set oApp = CreateObject("Inventor.Application")
If Err Then
End
End If
Else
End
End If
End If
The GetObject works if Inventor is running. Can't figure out why CreateObject fails.
Thanks for any help.
Ray C.