P
Paradigm
I am using the following code
Function fnStartAcad()
On Error Resume
Set acadapp = GetObject(, "AutoCAD.Application")
If Err Then
Debug.Print Err.Description
Err.clear
Set acadapp = CreateObject("AutoCAD.Application")
If Err Then
MsgBox Err.Description
Exit Function
End If
End If
On Error GoTo 0
acadapp.Visible = True
End Function
To start Autocad but the same thing seems to happen when I start other
programs. The first time I run it I can see Acad.exe in the list of
processes in task manager but the code seems to hang on the createobject
line. If I end the process I eventually get an error message saying it
cannot create the obkect. If I run the code a second time after ending the
process it works fine.
Can anyone shed any light on this.
Alec
Function fnStartAcad()
On Error Resume
Set acadapp = GetObject(, "AutoCAD.Application")
If Err Then
Debug.Print Err.Description
Err.clear
Set acadapp = CreateObject("AutoCAD.Application")
If Err Then
MsgBox Err.Description
Exit Function
End If
End If
On Error GoTo 0
acadapp.Visible = True
End Function
To start Autocad but the same thing seems to happen when I start other
programs. The first time I run it I can see Acad.exe in the list of
processes in task manager but the code seems to hang on the createobject
line. If I end the process I eventually get an error message saying it
cannot create the obkect. If I run the code a second time after ending the
process it works fine.
Can anyone shed any light on this.
Alec