All,
I need some help, I'm trying to copy a range of data out of Excel 2010 and paste it into the command line in AutoCAD using VBA. If someone could help me I would appreciate any help.
Thanks,
Brian
Sub GetAutoCAD2()
On Error Resume Next
Set AcadApp = GetObject(, "AutoCAD.Application")
If Err Then
Err.Clear
Set AcadApp = CreateObject("AutoCAD.Application")
End If
AppActivate AcadApp.Caption
AcadApp.Visible = True
AcadDoc.ActiveSpace = acModelSpace
If AcadApp.Documents.Count = 0 Then
AcadApp.Documents.Add ("acad12.dwt")
End If
Sheets("D").Select
Range("a1").Select
Range(Range("e9").Value).Select
Selection.Copy
AcadApp.ActiveDocument.SendCommand "_pasteclip"
End Sub
Bookmarks