Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Running a procedure in a module on graph change


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("Ra nge").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("Ra nge").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("Ra nge").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


--
tobriant
------------------------------------------------------------------------
tobriant's Profile: http://www.excelforum.com/member.php...o&userid=25155
View this thread: http://www.excelforum.com/showthread...hreadid=482877

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
to call procedure in a worksheet in a module CAPTGNVR Excel Discussion (Misc queries) 4 January 30th 07 09:39 PM
.OnAction points to wrong file.module.procedure Datasort Excel Programming 1 October 1st 05 12:43 AM
Add Procedure To Module Via VBA Al Excel Programming 2 May 20th 05 10:58 PM
programmatically open VBE and go to a specified procedure in target module? DataFreakFromUtah Excel Programming 4 July 12th 04 05:37 PM
Lines in a Module(Procedure) Juan Melero Excel Programming 6 December 30th 03 12:38 AM


All times are GMT +1. The time now is 10:31 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"