chainedtodesk
Programmer
i have a process that creates an excel chart, i would like for the chart to not have the filter pivot table options. these are gray buttons to the top/bottoms/sides based on the pivot table.
CODE:
Sub chart_share1()
Start_Row = 13
Chart_Name = "NEW PRODUCTS BOOKINGS"
Counter = 1
Point_Tot = 4 ' # of Fiscal Years
'Find Series Tot
Do Until Cells(Start_Row, Counter).Value = "" Or Counter = 50
Counter = Counter + 1
Loop
Series_Tot = Counter - 2
'Create Chart
Sheets("Sheet1").Select
Range(Cells(Start_Row, 2), Cells(Start_Row + Point_Tot - 1, 1 + Series_Tot)).Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range(Cells(Start_Row, 2), Cells(Start_Row + Point_Tot - 1, 1 + Series_Tot))
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetElement (msoElementChartTitleAboveChart) 'Add Title
ActiveChart.ChartTitle.Text = Chart_Name
'Move Chart
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet2"
ActiveChart.Parent.Name = Chart_Name
With ActiveSheet.ChartObjects(Chart_Name)
.Left = 375 ' CHART LOCATION (HORIZONTAL)
.Top = 232 ' CHART LOCATION (VERTICAL)
End With
'Series_Counter = 1
'Do Until Series_Counter = Series_Tot
' ActiveChart.SeriesCollection(Series_Counter).ApplyDataLabels
'' Point_Counter = 1
'' Do Until Point_Counter = Point_Tot - 1
'' ActiveChart.SeriesCollection(Series_Counter).Points(Point_Counter).DataLabel.Text = Sheets("Sheet3").Cells(Point_Counter, Series_Counter)
'' Point_Counter = Point_Counter + 1
'' Loop
' Series_Counter = Series_Counter + 1
'Loop
'Return to sheet1
Sheets("Sheet1").Select
Cells(1, 1).Select
End Sub
CODE:
Sub chart_share1()
Start_Row = 13
Chart_Name = "NEW PRODUCTS BOOKINGS"
Counter = 1
Point_Tot = 4 ' # of Fiscal Years
'Find Series Tot
Do Until Cells(Start_Row, Counter).Value = "" Or Counter = 50
Counter = Counter + 1
Loop
Series_Tot = Counter - 2
'Create Chart
Sheets("Sheet1").Select
Range(Cells(Start_Row, 2), Cells(Start_Row + Point_Tot - 1, 1 + Series_Tot)).Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range(Cells(Start_Row, 2), Cells(Start_Row + Point_Tot - 1, 1 + Series_Tot))
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetElement (msoElementChartTitleAboveChart) 'Add Title
ActiveChart.ChartTitle.Text = Chart_Name
'Move Chart
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet2"
ActiveChart.Parent.Name = Chart_Name
With ActiveSheet.ChartObjects(Chart_Name)
.Left = 375 ' CHART LOCATION (HORIZONTAL)
.Top = 232 ' CHART LOCATION (VERTICAL)
End With
'Series_Counter = 1
'Do Until Series_Counter = Series_Tot
' ActiveChart.SeriesCollection(Series_Counter).ApplyDataLabels
'' Point_Counter = 1
'' Do Until Point_Counter = Point_Tot - 1
'' ActiveChart.SeriesCollection(Series_Counter).Points(Point_Counter).DataLabel.Text = Sheets("Sheet3").Cells(Point_Counter, Series_Counter)
'' Point_Counter = Point_Counter + 1
'' Loop
' Series_Counter = Series_Counter + 1
'Loop
'Return to sheet1
Sheets("Sheet1").Select
Cells(1, 1).Select
End Sub