#1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default Help

Not sure what i'm doing wrong but it wont graph it correctly.

Sub Graph()
'
' Graph Macro
'

'
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
With ActiveSheet.Shapes(1).Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorAccent1
.ForeColor.TintAndShade = 0.3399999738
.ForeColor.Brightness = 0
.BackColor.ObjectThemeColor = msoThemeColorAccent1
.BackColor.TintAndShade = 0.7649999857
.BackColor.Brightness = 0
.TwoColorGradient msoGradientHorizontal, 1
End With
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "=Trend!$D$4"
ActiveChart.SeriesCollection(1).Values = "=Trend!$F$4:$Q$4"
ActiveChart.SeriesCollection(1).XValues = "=Trend!$F$3:$Q$3"
ActiveChart.Legend.Select
Selection.Delete
ActiveSheet.ChartObjects(1).Activate
ActiveChart.SeriesCollection(1).Select
With Selection.Format.ThreeD
.BevelTopType = msoBevelCircle
.BevelTopInset = 6
.BevelTopDepth = 6
End With
With Selection.Format.ThreeD
.BevelBottomType = msoBevelCircle
.BevelBottomInset = 6
.BevelBottomDepth = 6
End With
ActiveChart.ChartArea.Select
With ActiveSheet.Shapes(1).ThreeD
.BevelTopType = msoBevelCircle
.BevelTopInset = 6
.BevelTopDepth = 6
End With
With ActiveSheet.Shapes(1).ThreeD
.BevelBottomType = msoBevelCircle
.BevelBottomInset = 6
.BevelBottomDepth = 6
End With
Range("G2").Select
End Sub
  #2   Report Post  
Junior Member
 
Posts: 11
Default

Quote:
Originally Posted by View Post
Not sure what i'm doing wrong but it wont graph it correctly.

Sub Graph()
'
' Graph Macro
'

'
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
With ActiveSheet.Shapes(1).Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorAccent1
.ForeColor.TintAndShade = 0.3399999738
.ForeColor.Brightness = 0
.BackColor.ObjectThemeColor = msoThemeColorAccent1
.BackColor.TintAndShade = 0.7649999857
.BackColor.Brightness = 0
.TwoColorGradient msoGradientHorizontal, 1
End With
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "=Trend!$D$4"
ActiveChart.SeriesCollection(1).Values = "=Trend!$F$4:$Q$4"
ActiveChart.SeriesCollection(1).XValues = "=Trend!$F$3:$Q$3"
ActiveChart.Legend.Select
Selection.Delete
ActiveSheet.ChartObjects(1).Activate
ActiveChart.SeriesCollection(1).Select
With Selection.Format.ThreeD
.BevelTopType = msoBevelCircle
.BevelTopInset = 6
.BevelTopDepth = 6
End With
With Selection.Format.ThreeD
.BevelBottomType = msoBevelCircle
.BevelBottomInset = 6
.BevelBottomDepth = 6
End With
ActiveChart.ChartArea.Select
With ActiveSheet.Shapes(1).ThreeD
.BevelTopType = msoBevelCircle
.BevelTopInset = 6
.BevelTopDepth = 6
End With
With ActiveSheet.Shapes(1).ThreeD
.BevelBottomType = msoBevelCircle
.BevelBottomInset = 6
.BevelBottomDepth = 6
End With
Range("G2").Select
End Sub
This code does not make any sense without some context. Tell us what your trying to do and maybe we can help you figure it out.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"