我的宏记录器中可能有一个错误,因为当我尝试在 xlvalues 轴上记录颜色变化时,没有记录下来。我需要做的是设置具有2种不同灰度和不同透明度的渐变径向颜色。
我正在使用此代码来设置我的图表:
ActiveSheet.Shapes.AddChart.Select
With ActiveChart
.ChartType = xlRadar
.SetSourceData Source:=Range(StartCell, StopCell) ' Those contain a range of interesting data
With .SeriesCollection(1)
.Name = "=""Line 1"""
.Format.Line.Weight = 1.5
End With
With .SeriesCollection(2)
.Name = "=""Line 2"""
.Format.Line.Weight = 1.5
.Format.Line.DashStyle = msoLineDash
End With
.SetElement (msoElementChartTitleAboveChart)
.ChartTitle.Text = Left(Cells(StartCell.Row, 1).Text, 2) & "." & Mid(Cells(StartCell.Row, 1).Text, 3, 1) & " GHz"
With .Axes(xlValue)
.TickLabels.NumberFormat = "# ""dB"""
.Border.ColorIndex = 3 ' <- This is yet to be modified
End With
End With
我怎么做?我认为所有可以在 excel 中制作的东西,也可以在 vba 中以编程方式完成......