Excel charttype values

Hello, Using follwing code simply creates a a chart in Excel. oExcelSheets := oExcelWorkbook.Charts(); oExcelChart := oExcelSheets.Add(); oExcelRange := oExcelWorksheet.Range(‘B3’,‘C12’); nGallery := -4100; // Konstante xl3DColumn nFormat := 1; nPlotBy := 2; // Konstante xlColumns nCategoryLabels := 1; nSeriesLabels := 0; bHasLegend := FALSE; oExcelChart.ChartWizard(oExcelRange, nGallery, nFormat, nPlotBy, nCategoryLabels, nSeriesLabels, bHasLegend); Where can i find a list with values for the charttype (where nGallary holds the the value for charttype) Passing a non integer value does not work. Would be great to know, where to receive the list or either to know hot pass the charttype value as a string like in VB. Regards Ufuk Altinkaynak

Hi, if you go in Macro editor in Excel and type activechart.ChartType = then it will give you the whole list of charts

Hi Go to Excel => Visual Basic Editor. Select View => objects (“Objekt- Katalog”). Select XlChartType in the class window. Click on one of the types (on the right). Now you can see in the bottom of the window e.g. for xl3DArea Const xl3DArea = -4098 (&HFFFFEFFE). For this chart type you should use Integer:= -4098. I don’t know whether it is possible to get this on a list. bye André

Hi ajayjain, First off all thanks for your quick answer, but using: type activechart.ChartType = does not work. Fortunatly i found the answer myself. -Start Excel -Go to the Visual basic Editor - Open the immediate Window - type there in “?CHARTTYPE” (where CHARTTYPE is the chart you want to know) example: ?xl3dpie -4102 RESULT

Hi Andre DDB, your post came up during i was wrting my last post :wink: anyway, your provided way works also. So thanks for the information.

Often different ways lead to Rome [:D]. Important thing is to find a solution. bye André