about VBA of AutoCAD R14

about VBA of AutoCAD R14

Anonymous
Not applicable
292 Views
1 Reply
Message 1 of 2

about VBA of AutoCAD R14

Anonymous
Not applicable
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 !
0 Likes
293 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
One thing that you can look it is your exact
AutoCAD version.  R14 did not support VB or VBA.  R14.01 was the first
AutoCAD release that did support those programming environments.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
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 !

0 Likes