Hi Guys,
I would like to remove filter options available on Chart. How to do this using VBA? please refer to screen shot below:
Capture.JPG
Hi Guys,
I would like to remove filter options available on Chart. How to do this using VBA? please refer to screen shot below:
Capture.JPG
via the macro recorder
ActiveChart.ShowAllFieldButtons = False
This gives me Run time Error: 1004
Make sure the chart is selected before running code
I have added this line after adding chartobject and assigned sourcedata to chartobject. So I think this is selected. below is code I used:
this does not work for me.Worksheets("SheetName").ChartObjects("ChartName").Chart().Activate ActiveChart.ShowAllFieldButtons = False
Last edited by linok; 12-31-2014 at 07:21 AM.
Perhaps you can post example file.
This recorder code shows adding the chart and turning the filters off.
I can however get the error 1004 if the chart is NOT a pivot chart.Cells(1, 1).Select ActiveSheet.Shapes.AddChart.Select ActiveChart.ChartType = xlColumnClustered ActiveChart.SetSourceData Source:=Range("Sheet4!$A$1:$C$18") ActiveChart.ShowAllFieldButtons = False
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks