Hi All,
I'm quite new to VB for Excel and have a question hopefully you guys can help me with.
I've created code that will create a pivot table containing 6 RowFields. My idea is to allow the user to dynamically alter the pivot table and either remove or add any one of these RowFields by way of (selecting/unselecting) a check box (one check box for each RowField) taken from the Control Tool Box.
I've recorded some code and it appears that when adjusting the Pivot Table, the code makes reference to all RowFields as per below, not just the RowField I am removing or adding.
ActiveSheet.PivotTables("Mortgage_PT").AddFields RowFields:=Array( _
"Postcode_Category", "Customer_Type", "Occupation_Type", _
"Annual_Salary", "Employment_Period"), ColumnFields:="Data"
This presents a problem as I want the user to be able to have any combination of the 6 RowFields.
I was wondering if anyone can offer some helpful advice.
Thanks
Bookmarks