I am working on a project which up until recently used Excel VBA and AutoCAD. To the point, one of the important things this process did was grab a range of cells in the Excel file and copy them to the clipboard. This range of cells was a nicely formatted table with borders, cell filled colors, etc... and the VBA code would copy it to the clipboard before laumching AutoCAD. Once AutoCAD was opened a LISP program would automatically paste this into the model space. It made a lovely OLE object in AutoCAD with crisp, clear appearance.
We are now trying to do away with the VBA part in favor of .NET. I am really at a loss to explain why the code I used before will not work, nor will anything else I try:
VBA CODE
Sheets("Sheet2").Select Range("B1:K93").Copy
VB.NET CODE
vExcelRange1 - vExcelSheet2.Range("B1:K93") vExcelRange1.Copy()
The .NET code is not working at al. Can anyone point me in the correct location for assistane?
I am nearly there just need to get past the Ole text size box.
The next command for you is:
ThisDrawing.SendCommand "_pasteclip" & vbCr & "2,3" & vbCr
Where "2,3" are the coordinates where it would be pasted.
To get past the Ole text size box, you need to go to options "system" and uncheck the box with the "Display OLE text size dialog"
John