Message 1 of 2
about VBA of AutoCAD R14

Not applicable
12-04-2003
10:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have some problems about VBA of AutoCAD R14.
I would like to open AutoCAD R14 with VB using VBA.I have used the R14 libarary in my program and the text in the AutoCAD Help as bellow:
Dim myApp as AcadApplication
Dim myDoc as AcadDocument
On Error Resume Next
Set myApp = GetObject(, "AutoCAD.Application")
If Err Then
Err.Clear
Set myApp = CreateObject("AutoCAD.Application")
If Err Then
MsgBox Err.Description
Exit Sub
End If
End If
But when I start them ,there is tip like this "Type mismatch".I don't know why.My system is Windows 2000 with NO SPs.
Thanks for helping me !
I would like to open AutoCAD R14 with VB using VBA.I have used the R14 libarary in my program and the text in the AutoCAD Help as bellow:
Dim myApp as AcadApplication
Dim myDoc as AcadDocument
On Error Resume Next
Set myApp = GetObject(, "AutoCAD.Application")
If Err Then
Err.Clear
Set myApp = CreateObject("AutoCAD.Application")
If Err Then
MsgBox Err.Description
Exit Sub
End If
End If
But when I start them ,there is tip like this "Type mismatch".I don't know why.My system is Windows 2000 with NO SPs.
Thanks for helping me !