What does the number in the AddChart2 VBA macro represent?

前端 未结 4 525
情书的邮戳
情书的邮戳 2020-12-10 13:09

I\'ve use my Excel 2013 to record a macro in inserting a chart, a column-clustered chart in my case. In the view code option, it shows me a line of code as below:

         


        
4条回答
  •  Happy的楠姐
    2020-12-10 13:35

    One can also provide only the ChartType and the application will use the default style.

    Set oShp = ActiveSheet.Shapes.AddChart2(XlChartType:=xl3DColumnClustered)
    oShp.Chart.SetSourceData Source:=RngDta
    

    This picture shows the default ChartStyle for all ChartTypes (excluding StockHLC and StockVOHLC)

    enter image description here

提交回复
热议问题