สอบถามการทำกราฟ วงกลมซ้อนกราฟเส้น
Posted: Thu May 26, 2022 8:31 am
ผมได้ลองทำตามวิธีการในเว็บนี้ครับ
https://alesandrab.wordpress.com/2014/0 ... jqnhMhwEys
ติดปัญหาการรัน VBA บรรทัดที่ 9 ครับ
https://alesandrab.wordpress.com/2014/0 ... jqnhMhwEys
ติดปัญหาการรัน VBA บรรทัดที่ 9 ครับ
Code: Select all
Sub PieMarkers()
Dim chtMarker As Chart
Dim chtMain As Chart
Dim intPoint As Integer
Dim rngRow As Range
Dim lngPointIndex As Long
Application.ScreenUpdating = False
Set chtMarker = ActiveSheet.ChartObjects(“chtMarker”).Chart
Set chtMain = ActiveSheet.ChartObjects(“chtMain”).Chart
Set chtMain = ActiveSheet.ChartObjects(“chtMain”).Chart
Set rngRow = Range(ThisWorkbook.Names(“PieChartValues”).RefersTo)
For Each rngRow In Range(“PieChartValues”).Rows
chtMarker.SeriesCollection(1).Values = rngRow
chtMarker.Parent.CopyPicture xlScreen, xlPicture
lngPointIndex = lngPointIndex + 1
chtMain.SeriesCollection(1).Points(lngPointIndex).Paste
Next
lngPointIndex = 0
Application.ScreenUpdating = True
End Sub