- Sub cc100()
- Dim cc(0 To 2) As Double
- Dim dd(0 To 2) As Double
- On Error Resume Next
- Set ExcelApp = GetObject(, "Excel.Application")
- If Err <> 0 Then
- Set ExcelApp = CreateObject("Excel.Applicationn")
- End If
- Set ExcelApp = CreateObject("excel.application")
-
- ExcelApp.Workbooks.Open ("C:\123.xls")
- Set excelsheet = ExcelApp.ActiveWorkbook.Sheets("sheet1")
- cc(0) = 1000
- cc(1) = 1000
- cc(2) = 0
- dd(0) = excelsheet.range("a1").Value
- dd(1) = excelsheet.range("a1").Value
- dd(2) = 0
-
- For i = 1 To 100 Step 10
- Call ThisDrawing.ModelSpace.AddCircle(cc, i * 10)
- Call ThisDrawing.ModelSpace.AddCircle(dd, i * 10)
- Next i
- End Sub
|