Hi All,
I have tried and failed to work out how to modify this recorded line of code to allow me to use variables. The line is based on reordering a pivot table hierarchical field into the order that I want. I’m doing this as I can’t use Custom Lists as the list far exceeds the limit allowable.
What I’m after is to allow ‘Football’ and 'Position' to be variables, so when I loop the line I can say what position in the list the variables should be. Football position 1, Tennis position 2 etc.
Any pointers would be much appreciated.
ActiveSheet.PivotTables("PivotTest").PivotFields("[Respon_Table].[Responsibilities].[Sport]").PivotItems("[Respon_Table].[Responsibilities].[Sport].&[Football]").Position = 1
I have tried and failed to work out how to modify this recorded line of code to allow me to use variables. The line is based on reordering a pivot table hierarchical field into the order that I want. I’m doing this as I can’t use Custom Lists as the list far exceeds the limit allowable.
What I’m after is to allow ‘Football’ and 'Position' to be variables, so when I loop the line I can say what position in the list the variables should be. Football position 1, Tennis position 2 etc.
Any pointers would be much appreciated.
ActiveSheet.PivotTables("PivotTest").PivotFields("[Respon_Table].[Responsibilities].[Sport]").PivotItems("[Respon_Table].[Responsibilities].[Sport].&[Football]").Position = 1