0 Replies Latest reply: Dec 27, 2012 9:35 AM by victor_p RSS

    Add minichart column via VB macros

      Hi,

       

      Could you please help me with setting up a minichart column via VB Macros?

       

      Here is a code I'm trying to use:

       

      set chart = ActiveDocument.GetSheetObject("CH55")
      set p = chart.GetProperties
      set exps = p.Expressions
      set expItem = exps.Item(0).Item(0).Data.ExpressionVisual
      expItem.Label.v = "Trend line"
      exps.Item(0).Item(0).Data.ExpressionData.UsePartialSum = false ' no totals
      expItem.MiniChartCellSettings.Dimension(0).Name="time_id"
      expItem.MiniChartCellSettings.Dimension(0).Type=1 
      chart.SetProperties p
      

       

      expItem.MiniChartCellSettings.Dimension(0).Name="time_id" produces an error "Invalid procedure call or argument".

       

      In fact, I can refer to expItem.MiniChartCellSettings.Dimension(0).Name if I already set up minichart manually via GUI but that is not the case I need.

       

      Any references and examples are greatly appreciated.

      Thanks in advance