W
wesley24
Hello,
I am tring to get the user to input the abbreviation for the month
they would like to pivot on, assign it to a variable, and use it to
identify which datafield to select.
* PivMonth = InputBox(prompt:="Please enter the abbreviation for the
month you would like to see in your pivot table. (ex. Dec)")
Set WIPcache =
WB.PivotCaches.Add(SourceType:=xlDatabase, SourceData:=PivRng.Address)
Set WIPpiv =
WIPcache.CreatePivotTable(Tabledestination:=Piv.Range("A3"),
Tablename:="PivWIP")
With WIPpiv.PivotFields("Program ID")
.Orientation = xlRowField
End With
* ActiveSheet.PivotTables("PivWIP").AddDataField
ActiveSheet.PivotTables("PivWIP" _
).PivotFields(PivMonth & "USD"), xlSum
Thank you,
Wes
I am tring to get the user to input the abbreviation for the month
they would like to pivot on, assign it to a variable, and use it to
identify which datafield to select.
* PivMonth = InputBox(prompt:="Please enter the abbreviation for the
month you would like to see in your pivot table. (ex. Dec)")
Set WIPcache =
WB.PivotCaches.Add(SourceType:=xlDatabase, SourceData:=PivRng.Address)
Set WIPpiv =
WIPcache.CreatePivotTable(Tabledestination:=Piv.Range("A3"),
Tablename:="PivWIP")
With WIPpiv.PivotFields("Program ID")
.Orientation = xlRowField
End With
* ActiveSheet.PivotTables("PivWIP").AddDataField
ActiveSheet.PivotTables("PivWIP" _
).PivotFields(PivMonth & "USD"), xlSum
Thank you,
Wes