|
楼主 |
发表于 2023-2-2 22:36
|
显示全部楼层
Ppt的一级套一级的关系" & vbCr & "把人搞的晕晕乎乎老出错
- Sub del()
- Dim DateArr
- DateArr = Array(0.344143518518518, 0.295590277777778, 0.305763888888889, 0.316655092592593, 0.28744212962963, 0.335081018518519, 0.301400462962963, 0.428032407407407, 0.751655092592593, 0.746076388888889, 0.731851851851852, 0.709282407407407, 0.639097222222222, 0.656782407407407, 0.762569444444444, 0.822488425925926)
-
-
- Dim oChart As Chart
- Dim XlWk As Workbook
- Dim Sht As Worksheet
- Dim Rng As Range
- Dim Grp As Graph.Application
- Dim GrpSht As DataSheet
- Dim GrpChart As Graph.Chart
- Dim ii, jj, Ss, Hh
- Dim Pres As Presentation
- Dim Sld As Slide
- Dim Shp 'As Shape
- Dim ShpRng As ShapeRange
- Set Pres = Application.ActivePresentation
- If Pres.Slides.Count >= 1 Then
- For ii = Pres.Slides.Count To 1 Step -1
- Set Sld = Pres.Slides(ii)
- Sld.Delete
- Next ii
- End If
- For Each Shp In Pres.Slides
- 'Shp.Delete
- Next Shp
- Stop
- ''
- Arr = Array(-4098, 78, 79, 60, 61, 62, -4100, 54, 55, 56, -4101, -4102, 70, 1, 76, 77, 57, 71, 58, 59, 15, 87, 51, 52, 53, 102, 103, 104, 105, 99, 100, 101, 95, 96, 97, 98, 92, 93, 94, -4120, 80, 4, 65, 66)
-
- ''
- For ii = 0 To 2 '44 'UBound(Arr)
- Set Sld = Pres.Slides.Add(ii + 1, ppLayoutBlank)
- Set Shp = Sld.Shapes.AddOLEObject(Left:=50, Top:=180, Width:=700, Height:=320, ClassName:="MSGraph.Chart", Link:=msoFalse)
- ''
- Set GrpChart = Shp.OLEFormat.Object
- Debug.Print GrpChart.Name
- ''
- With GrpChart
- ''
- Set GrpSht = .Application.DataSheet
- With GrpSht
- For jj = 1 To 8
- GrpSht.Cells(1, jj + 1) = "A" & jj
- Next jj
- ''
- For jj = 0 To 7
- GrpSht.Cells(2, jj + 2) = Format(DateArr(jj), "hh:mm:ss")
- GrpSht.Cells(3, jj + 2) = Format(DateArr(jj + 8), "hh:mm:ss")
- Ss = DateArr(jj + 8) - DateArr(jj)
- GrpSht.Cells(4, jj + 2) = Format(Ss, "hh:mm:ss")
- Next jj
- .Application.Chart.ChartType = Arr(ii) 'xlLineMarkersStacked ' Arr(9)(0)
- End With
- .HasDataTable = True
- .HasLegend = False
- .HasTitle = True
- .HasAxis(xlCategory, xlPrimary) = True
- .HasAxis(xlValue, xlPrimary) = False
-
- .ChartTitle.Text = "Ppt的一级套一级的关系" & vbCr & "把人搞的晕晕乎乎老出错"
-
- End With
- Next ii
- End Sub
复制代码
|
|