- ©«¤l
- 28
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 54
- ÂI¦W
- 0
- §@·~¨t²Î
- windows xp pro
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x«n¥«
- µù¥U®É¶¡
- 2010-5-5
- ³Ì«áµn¿ý
- 2016-6-8
|
¦]¬°Åv¤£¨¬ ´£¨Ñ¤§«eµ{¦¡½Xµ¹§A°Ñ¦Ò
°ò¥»¤W°ÊºA¹Ïªíªº·§©À ¥u¬O§R°£¦bµe¦Ó¤w
Sub Chart1()
Dim ChtObj As ChartObject
Dim nRow As Integer
Dim ChartWidth As Single
Dim ChartHeight As Single
Dim ChartTop As Single
Dim ChartLeft As Single
ChartWidth = 450
ChartHeight = 250
ChartLeft = 1
ChartTop = 1
nRow = Worksheets("sheet2").Range("A65536").End(xlUp).Row
On Error Resume Next
With Worksheets("sheet1")
.Activate
.ChartObjects("Chart").Delete
End With
With Worksheets("sheet1")
.Activate
Set ChtObj = .ChartObjects.Add(ChartLeft, ChartTop, ChartWidth, ChartHeight)
End With
With ChtObj.Chart
.SetSourceData Worksheets("sheet2").Range("A2:A" & CStr(nRow))
.ChartType = xlLine
.HasTitle = True
.ChartTitle.Characters.Text = "¦¨¥æ»ù½u§Î¹Ï"
.SeriesCollection(1).Name = "¦¨¥æ»ù"
End With
ChtObj.Name = "Chart"
End Sub |
|