Hello,
I'm an intern at a company right now learning macros for Microsoft Excel. I have many columns of data and my project is to macro them to make many graphs, but for now I'm trying to just make one. I make the graph in the first step and everything looks fine, but then when I run the macro, the graph changes and the secondary y-axis disappears. What's wrong?
Here's the code:
Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:= _
"Line - Column on 2 Axes"
ActiveChart.SetSourceData Source:=Sheets("Monthly").Range( _
"A9:A157,B9:B157,B165:B313"), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsNewSheet
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
.Axes(xlCategory, xlSecondary).HasTitle = False
.Axes(xlValue, xlSecondary).HasTitle = False
End With
End Sub
If someone wants, I'll upload screenshots of how the graphs change.
Thanks a lot,
Jack
Bookmarks