0

I have many diagrams in excel and I need to change their look. I wrote this cscript in VBA but it is not working:

Sub Makro1()
'
' Makro1 Makro
'

'
For i = 1 To 28
    ActiveSheet.ChartObjects("Diagramm " & i).Activate
    ActiveSheet.Shapes("Diagramm " & i).Line.Visible = msoFalse
Next i
End Sub

With this script I am trying to change the frame line to no frame line. But it is not working and I cannto find the bug. Moreover, I need to change the name of the y-axis. Any idea how can I do this?

GeMa
  • 149
  • 1
  • 3
  • 13
  • 1
    @pnuts: do you mean if I have the number "1" (if the numbering of my charts starts from 1) or if it is named "Diagramm"? The "Diagramm" is the "Chart" for the german version of excel. – GeMa Aug 31 '16 at 09:32

1 Answers1

0

Not sure what you mean by frame line, your code as-is works for me by removing the object border.

Y-axis is:

ActiveChart.Axes(xlValue, xlPrimary).HasTitle = True
ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Title Here"
Tim Edwards
  • 1,031
  • 1
  • 13
  • 34