Sub DrawPL()
On Error Resume Next
Set ExcelApp = GetObject(, "excel.Application")
If Err Then
Err.Clear
Set ExcelApp = CreateObject("excel.application")
If Err Then
MsgBox ("不能运行excel,检查是否安装了excel")
Exit Sub
End If
End If
ExcelApp.Workbooks.Open "C:\2000.xls", , ReadOnly
Dim i As Integer, tim As Date
tim = Timer
Dim ord(0 To 422) As Double
i = 2
Dim s As Integer
s = 0
If s < 420 Then
For i = 2 To 142
ord(s) = ExcelApp.ActiveWorkbook.Worksheets("位置信息").Range("p" & i)
ord(s + 1) = ExcelApp.ActiveWorkbook.Worksheets("位置信息").Range("o" & i)
ord(s + 2) = 0
s = s + 3
autocad vba从excel表格插入单条多段线
最新推荐文章于 2022-12-09 21:59:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)