我已经可以反过来从excel中调用了! Sub text() Dim p(0 To 2) As Double '定义坐标变量 ss$ = CStr(dydqxls)
MsgBox ss p(0) = 310.77: p(1) = 42: p(2) = 0 '坐标赋值
Set txtobj = ThisDrawing.PaperSpace.AddMText(p, 50, ss)
End Sub Function dydqxls()
Dim ExcelApp As Excel.Application
On Error Resume Next Set ExcelApp = GetObject(, "Excel.Application") If Err <> 0 Then Set ExcelApp = CreateObject("Excel.Applicationn") End If a = ExcelApp.ActiveWorkbook.Sheets("数据输入").Range("b11").Value
dydqxls = a End Function 大家试试看! |