[VBA] Search for Excel Chart Names

Miloatlantis -  
 stenz -
Hello!

In order to modify charts in VBA that are located in an Excel sheet, I need to know their names...

Apparently, their names are "Chart 1", "Chart 2", etc... But I don't know which name corresponds to which chart!

Is there a menu in Excel where I can find out their names?

Thank you for your help!
Configuration: Windows XP Firefox 2.0.0.1

4 answers

  1. ruzakruzak Posted messages 466 Registration date   Status Member 247
     
    You can find the name when you right-click on a chart and select > assign macro.
    There you can see the name of the chart, but I'm sure you can find this information elsewhere. But I can't remember where...
    14
  2. stenz
     
    Hello,

    It may be a bit late to respond, but since I had the same question and found the answer on another forum, I’m sharing it for future reference:

    With ActiveChart
    .....
    .Parent.Name = "Test"
    End With
    5
  3. LN
     
    Hello,
    I have about the same problem: in my Excel macros, I need to select charts, and when using the macro recorder, it names them something like "Chart25".

    Is there a way to give names to the charts in the VBA program when they are created? (I’ve tried several things without success.)

    Thank you and see you soon!
    2
  4. Anonymous user
     
    Hello,

    Suggestion :

     Sub Find_Graphic_Name() Dim Graphic As Chart For Each Graphic In Charts MsgBox "Title : " & Graphic.ChartTitle.Caption & vbCrLf & _ "Sheet : " & Graphic.Name Next Graphic End Sub ' 


    Lupin
    2