Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Set mychartdestination = .Range("A2:z10")
  2.  
  3. Set mychart = .Shapes.AddChart(XlChartType:=xlColumnClustered, _
  4. Left:=mychartdestination.Cells(1).Left, Top:=mychartdestination.Cells(1).Top, _
  5. Width:=mychartdestination.Width, Height:=mychartdestination.Height).Chart
  6.  
  7. With mychart
  8. .Axes(xlValue).MaximumScale = 16000000
  9. .Axes(xlValue).MajorUnit = 4000000
  10. .ChartArea.Select
  11. .ChartArea.Height = 216
  12. .ChartArea.Width = 360
  13. .ChartGroups(1).GapWidth = 65
  14.  
  15. End With
  16.  
  17. ActiveSheet.ChartObjects.Select
  18. ActiveSheet.ChartObjects.Copy
  19. Sheets("Sheet18").Range("a1").Paste
  20.  
  21. mychart.SetSourceData Source:=mysourcedata
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement