Hi guys
I've been stuck with this problem for a while now and was hoping one of you could help out .
The problem code is shown below and is being run from a word document which reads an excel file (myWB - opened with a GetObject call).
The graph is correct in the excel document and the type is the same as the .ChartType i set.
Any help would be greatly appreciated, no idea where to go from here and ive tried many different approaches.
I've been stuck with this problem for a while now and was hoping one of you could help out .
The problem code is shown below and is being run from a word document which reads an excel file (myWB - opened with a GetObject call).
Code:
With myWB.Sheets("Graphs").ChartObjects(chartreq%).Chart
'Name of the chart is correct
temp$ = .Name
.ChartType = Excel.XlChartType.xlColumnClustered
'error occurs on the line below (1004 the specified dimension is not valid for the current chart type)
.CopyPicture Appearance:=xlScreen, Size:=xlPrinter, Format:=xlPicture
'pasting chart etc...
End With
The graph is correct in the excel document and the type is the same as the .ChartType i set.
Any help would be greatly appreciated, no idea where to go from here and ive tried many different approaches.