Retrieve the name of a series from a GCD using VBA

Solved
PERNST Posted messages 14 Status Member -  
PERNST Posted messages 14 Status Member -
Hello

I'm looking to automatically format a GCD.

For this, I need to retrieve the name of each data series and assign it a color through a separate table that I define.

Problem: In my macro, when I select the GCD series to retrieve the name, I always get "Empty" as a response:

ActiveChart.FullSeriesCollection(seriesNumber).Name=SeriesName
with
seriesNumber: the series number
SeriesName: the name I am trying to retrieve... and which is always "Empty"

Can someone help me?

Thanks in advance

1 answer

  1. Patrice33740 Posted messages 8400 Registration date   Status Member Last intervention   1 785
     
    Hello,

    To "retrieve" the name, it would rather be:
    NomSérie=ActiveChart.FullSeriesCollection(nosérie).Name 


    --
    Kind regards
    Patrice
    0
    1. PERNST Posted messages 14 Status Member
       
      Tired I am, sleep I must...
      Of course!

      Thank you for your reply!
      0