- 积分
- 1622
- 明经币
- 个
- 注册时间
- 2015-7-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
Sub tpic() ' 打开excel文件, 导入cad 坐标 ,带文字
On Error Resume Next
Dim xls As New Excel.Application ', czz As Variant
Dim xlbook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim FileName As String
xls.Visible = 1
Dim xlbk As Variant
Dim xlst As Variant
FileName = xls.Application.GetOpenFilename("Excel 文件 (*.xlsx),*.xlsx")
Set xlbk = xls.Workbooks.Open(FileName)
xls.Visible = True
Dim ey As AcadText, er As AcadText, pt1, pt2(0 To 2) As Double
Dim arr As Variant
Dim i As Integer, lst As Integer
Dim ac(0 To 2) As Double
Set xlst = xlbk.Worksheets("sheet1")
arr = xlst.UsedRange '返回代表指定工作表上已使用区域的 Range的对象
lst = UBound(arr, 1) '
Dim b As Integer
b = 0
----------------------------------------------------------------------------------------------------------------------------------------------------------
' czz = Format(xls.Match(xlst.Range("a3"), xlst.Columns("b"), 0))
' row1 = Format(Application.WorksheetFunction.Match(Workbooks(2).Sheets("sheet1").Range("a5"), Columns("b"), 0))
就这两句我想在cad vba里调用excel 的match 函数 能不能调用????
----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|