T
tobriant
Can anyone tell me how to run one of the following procedures each time
a field button in a pivot chart changes? The precedures are in a module
that I needs to be run if "Under 50 Stores", "50 to 200 Stores", or
"Over 200 Stores" is selected from the field button of the chart:
-------------------------------------------------
Sub Format_Under_50_Stores()
ActiveChart.PivotLayout.PivotTable.PivotFields("Range").CurrentPage =
_
"Under 50 Stores"
ActiveChart.SeriesCollection("Under 50 Stores").Select
With Selection.Border
..ColorIndex = 1
..Weight = xlThick
..LineStyle = xlContinuous
End With
With Selection
..MarkerBackgroundColorIndex = xlNone
..MarkerForegroundColorIndex = xlNone
..MarkerStyle = xlNone
..Smooth = True
..MarkerSize = 5
..Shadow = False
End With
ActiveChart.Deselect
End Sub
Sub Format_50_to_200_Stores()
ActiveChart.PivotLayout.PivotTable.PivotFields("Range").CurrentPage =
_
"50 to 200 Stores"
ActiveChart.SeriesCollection("50 to 200 Stores").Select
With Selection.Border
..ColorIndex = 1
..Weight = xlThick
..LineStyle = xlContinuous
End With
With Selection
..MarkerBackgroundColorIndex = xlNone
..MarkerForegroundColorIndex = xlNone
..MarkerStyle = xlNone
..Smooth = True
..MarkerSize = 5
..Shadow = False
End With
ActiveChart.Deselect
End Sub
Sub Format_Over_200_Stores()
ActiveChart.PivotLayout.PivotTable.PivotFields("Range").CurrentPage =
_
"Over 200 Stores"
ActiveChart.SeriesCollection("Over 200 Stores").Select
With Selection.Border
..ColorIndex = 1
..Weight = xlThick
..LineStyle = xlContinuous
End With
With Selection
..MarkerBackgroundColorIndex = xlNone
..MarkerForegroundColorIndex = xlNone
..MarkerStyle = xlNone
..Smooth = True
..MarkerSize = 5
..Shadow = False
End With
ActiveChart.Deselect
End Sub
a field button in a pivot chart changes? The precedures are in a module
that I needs to be run if "Under 50 Stores", "50 to 200 Stores", or
"Over 200 Stores" is selected from the field button of the chart:
-------------------------------------------------
Sub Format_Under_50_Stores()
ActiveChart.PivotLayout.PivotTable.PivotFields("Range").CurrentPage =
_
"Under 50 Stores"
ActiveChart.SeriesCollection("Under 50 Stores").Select
With Selection.Border
..ColorIndex = 1
..Weight = xlThick
..LineStyle = xlContinuous
End With
With Selection
..MarkerBackgroundColorIndex = xlNone
..MarkerForegroundColorIndex = xlNone
..MarkerStyle = xlNone
..Smooth = True
..MarkerSize = 5
..Shadow = False
End With
ActiveChart.Deselect
End Sub
Sub Format_50_to_200_Stores()
ActiveChart.PivotLayout.PivotTable.PivotFields("Range").CurrentPage =
_
"50 to 200 Stores"
ActiveChart.SeriesCollection("50 to 200 Stores").Select
With Selection.Border
..ColorIndex = 1
..Weight = xlThick
..LineStyle = xlContinuous
End With
With Selection
..MarkerBackgroundColorIndex = xlNone
..MarkerForegroundColorIndex = xlNone
..MarkerStyle = xlNone
..Smooth = True
..MarkerSize = 5
..Shadow = False
End With
ActiveChart.Deselect
End Sub
Sub Format_Over_200_Stores()
ActiveChart.PivotLayout.PivotTable.PivotFields("Range").CurrentPage =
_
"Over 200 Stores"
ActiveChart.SeriesCollection("Over 200 Stores").Select
With Selection.Border
..ColorIndex = 1
..Weight = xlThick
..LineStyle = xlContinuous
End With
With Selection
..MarkerBackgroundColorIndex = xlNone
..MarkerForegroundColorIndex = xlNone
..MarkerStyle = xlNone
..Smooth = True
..MarkerSize = 5
..Shadow = False
End With
ActiveChart.Deselect
End Sub