标签:lin sub tchar tick line art sid chart ide
Sub hong3()
‘
‘ 宏3 宏d
Dim a, b As Integer
Dim str As String
For a = 227 To 947 Step 15
b = a + 5
str = "Sheet1!B" + CStr(a) + ":G" + CStr(b)
sh = ActiveSheet.Shapes.AddChart2(216, xlBarClustered)
sh.Select
ActiveChart.SetSourceData Source:=Range(str)
ActiveChart.SetElement (msoElementChartTitleNone)
ActiveChart.SetElement (msoElementPrimaryValueGridLinesNone)
ActiveChart.SetElement (msoElementLegendRight)
ActiveChart.SetElement (msoElementPrimaryValueAxisNone)
ActiveChart.HasAxis(xlCategory) = True
With sh
.Top = Range("j" + CStr(a - 1)).Top
.Left = Range("j" + CStr(a - 1)).Left
End With
ActiveChart.Axes(xlCategory).Select
Selection.MajorTickMark = xlOutside
ActiveChart.SetElement (msoElementDataLabelOutSideEnd)
Next a
End Sub
标签:lin sub tchar tick line art sid chart ide
原文地址:http://www.cnblogs.com/Alex0111/p/7623531.html