Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. Application.ActivePresentation.Slides(1).Shapes(1).Chart.ChartData.Workbook.activesheet
  2.  
  3. Option Explicit
  4.  
  5. Sub Macro1()
  6.  
  7. ' recorded in excel and modified
  8.  
  9. Dim chrt As Chart
  10. ' Set chrt = ActiveSheet.ChartObjects("Chart 1").Chart ' excel object
  11. Set chrt = Application.ActivePresentation.Slides(1).Shapes(1).Chart
  12.  
  13. chrt.ClearToMatchStyle
  14. chrt.ChartStyle = 203
  15. chrt.ChartStyle = 340
  16. chrt.ChartStyle = 333
  17. chrt.ChartStyle = 399
  18.  
  19. chrt.ChartType = xlColumnClustered
  20.  
  21. Dim fsc As FullSeriesCollection
  22. Set fsc = chrt.FullSeriesCollection
  23.  
  24. With fsc(1).Format.Fill
  25. .Visible = msoTrue
  26. .ForeColor.RGB = RGB(255, 192, 0)
  27. .Transparency = 0.5
  28. .Solid
  29. End With
  30.  
  31. With fsc(1).Format.Line
  32. .Visible = msoTrue
  33. .ForeColor.RGB = RGB(255, 0, 0)
  34. .Transparency = 0
  35. End With
  36.  
  37. With fsc(2).Format.Fill
  38. .Visible = msoTrue
  39. .ForeColor.ObjectThemeColor = msoThemeColorAccent1
  40. .ForeColor.TintAndShade = 0
  41. .ForeColor.Brightness = -0.25
  42. .Transparency = 0
  43. .Solid
  44. End With
  45.  
  46. With fsc(3).Format.Fill
  47. .Visible = msoTrue
  48. .ForeColor.RGB = RGB(146, 208, 80)
  49. .Transparency = 0
  50. .Solid
  51. End With
  52.  
  53. With fsc(3).Format.Line
  54. .Visible = msoTrue
  55. .ForeColor.RGB = RGB(255, 0, 0)
  56. .Transparency = 0
  57. End With
  58.  
  59. With fsc(1).Points(1).Format.Fill
  60. .Visible = msoTrue
  61. .ForeColor.RGB = RGB(255, 0, 0)
  62. .Transparency = 0.6299999952
  63. .Solid
  64. End With
  65.  
  66. With fsc(1).Points(1).Format.Line
  67. .Visible = msoTrue
  68. .ForeColor.RGB = RGB(0, 176, 80)
  69. .Transparency = 0.0500000119
  70. .Weight = 5
  71. .Style = msoLineThickBetweenThin
  72. End With
  73.  
  74. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement