Vinculando dados ao gráfico usando vba

0

Estou tentando conectar esses dados ao meu gráfico, mas estou recebendo um erro definido pelo aplicativo ou objeto definido

Dim chtObj As ChartObject
For Each chtObj In ActiveSheet.ChartObjects
chtObj.Delete
Next


Dim myChartObject As ChartObject
Set myChartObject = Application.Workbooks(file_name).Worksheets("PP_DETAILS").ChartObjects.Add(Left:=200, Top:=200, Width:=400, Height:=300)


Application.Workbooks(file_name).Worksheets("PP_DETAILS").Range("M2:M7").Select

Application.Workbooks(file_name).Worksheets("PP_DETAILS").ChartObjects.SetSourceData Source:=Range("PP_DETAILS!$M$2:$M$7")
Application.Workbooks(file_name).Worksheets("PP_DETAILS").ChartObjects.ChartType = xlColumnClustered
    
por Ashwith Ullal 05.01.2016 / 08:42

0 respostas