Excel & Autocad VBA

Wil_Wizard

New Member
Joined
Jun 13, 2002
Messages
9
Hello Sirs,

In the very first beggining integrating CAD and Excel, I´m using the following code to open Autocad from Excel.

---------------------------
Sub OpenCad
Dim CadAppl as Autocad.Application

On Error Resume Next
Set CadAppl = GetObject(,"Autocad.Application")
If Err <> 0 then
Err.Clear
Set CadAppl = CreateObject("Autocad.Application")
If Err <> 0 then
MsgBox "Could not Start Cad", vbExclamation
End
End If
End If
CadAppl.Visible = True

End Sub
---------------------------

I´m using Autocad LT 2002 and not sure if this one is compatible with VBA usage.

Regards,

Wil_Wizard
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
To Complete Question

Just to complete the question. In fact the code above does not work. It says the message in the MsgBox.

Thanks!!
 
Upvote 0

Forum statistics

Threads
1,196,360
Messages
6,014,811
Members
441,847
Latest member
hw407

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top