xlvalues 축에서 색 변경을 기록하려고 시도 할 때 매크로 기록기에 버그가있는 것 같습니다. 기록되지 않습니다. 내가해야 할 일은 그라데이션의 방사형 컬러를 2 가지 다른 음영과 투명도로 설정하는 것입니다.Excel VBA - 졸업 할 xlvalues 축 색 설정
내 차트를 설정하려면이 코드를 사용하고 있습니다 :
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에서 수행 될 수있었습니다 ...
은 ['this'] (http://vba4all.wordpress.com/2013/09/26/macro-recorder-xy-scatter-bug/) 관련? –
아니요 .Border.ColorIndex'는 색상을 잘 바꾸는 것만으로 작동합니다 ... 회색 그래디언트로 설정해야만 빨간색 (= 3)이됩니다. – Noldor130884
은 '3'대신 '15'을 시도합니다. - 원인은 15입니다. 회색 –