Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use VBA command to control PivotField dropdown?

Status
Not open for further replies.

feipezi

IS-IT--Management
Aug 10, 2006
316
US
Hi,
I tried use Sub Worksheet_Change()/Worksheet_SelectionChange() to make it happen but ended up with something not wanted.
What I want is to make some change happen on a Worksheet as I pick a item from a PivotField.
Do I have to create a ComboBox and use LinkCell property to link it to a P.field?
Thanks in advance.
John Z.
 





What kind of field? A PAGE FIELD?

Post your code that you are having a problem with.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Skip,
Sorry but I missed you.
I found the event sub Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable) that works.
The code like:

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Application.ScreenUpdating = False
BeforeChart "State Comparison", "state"
UpdateCharts "State Comparison", "Market: ", "mkt", " Product: ", "product"
Call AdjustColWidth
Range("a1").Activate
Application.ScreenUpdating = True
End Sub

Thanks again for the following up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top