ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to apply the custom chart type: "Line - Column on 2 Axes" (https://www.excelbanter.com/excel-programming/359347-how-apply-custom-chart-type-line-column-2-axes.html)

talrs

How to apply the custom chart type: "Line - Column on 2 Axes"
 
Hi,

As I wrote in earlier question I recently automated an Excel app to show
some statistics from a different program Im currently working on.
One obstacle I still couldnt pass was the custom type: "Line - Column on 2
Axes" chart.
Using the macro VBA recorder I got the following code:
Sub Macro1()
ActiveChart.SeriesCollection(2).Select
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:= _
"Line - Column on 2 Axes"
End Sub
Which I translated to C++ code as:
chart - ApplyCustomType ( (XlChartType)xlBuiltIn, "Line - Column on 2 Axes"
);
The result was as in previous attempts the default chart type in the user
defined custom types.
As much as I looked for I couldnt find any reference to "Line - Column on
2 Axes" TypeName in the excel.tlh or .tli or using the OLE/COM object viewer.
Or a function that can get an €œXlChartGallery€ enum as the chart type
parameter rather then the XlChartType.

Im sure that if the VBA can do it then there is a way to automate it in
C++, please let me know how:)

Thanks
Tal.



All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com