Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. ActiveSheet.Shapes.AddChart.Select
  2. ActiveChart.ChartType = xlXYScatter
  3. ActiveChart.SeriesCollection.NewSeries
  4. ActiveChart.SeriesCollection(1).Name = "='Sheet2'!$A$9"
  5. ActiveChart.SeriesCollection(1).XValues = "='Sheet2'!$B$9"
  6. ActiveChart.SeriesCollection(1).Values = "='Sheet2'!$C$9"
  7.  
  8. With Sheets(3).ChartObjects("Chart 8")
  9. .SeriesCollection(1).AxisGroup = xlSecondary (Error Occurs here)
  10. .HasAxis(xlCategory, xlPrimary) = True
  11. .HasAxis(xlCategory, xlSecondary) = True
  12. .HasAxis(xlValue, xlPrimary) = True
  13. .HasAxis(xlValue, xlSecondary) = True
  14. .Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
  15. .Axes(xlCategory, xlSecondary).CategoryType = xlAutomatic
  16. End With
  17.  
  18. ActiveChart.SeriesCollection(1).Values = "='Sheet2'!$D$9"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement