Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning values to Pivot field
I am using a macro to assign a value to a pivot field. We have a drop-down
menu that the user selects a value from and through a vlookup, the value that is selected from the menu is then selected in a specific pivot field. Our problem is that when the macro runs, instead of just selecting the selected value from the list contained in the pivot field, it actually changes the current value to the new "user selected" value! How do I go about telling excel to select the value from the list instead of overwriting the current selection? Here is what the macro looks like as of right now... Sub ClassDescriptionSync() With ActiveSheet.PivotTables("ClassDescTbl1") .ManualUpdate = True .PivotFields("Class Description").CurrentPage = ActiveSheet.Range("O2").Value .ManualUpdate = False End With End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning values to Pivot field
Nevermind. I found a post by Tom Ogilvy from about two weeks ago that
answered my question wonderfully. Thanks Tom! "cmungall" wrote: I am using a macro to assign a value to a pivot field. We have a drop-down menu that the user selects a value from and through a vlookup, the value that is selected from the menu is then selected in a specific pivot field. Our problem is that when the macro runs, instead of just selecting the selected value from the list contained in the pivot field, it actually changes the current value to the new "user selected" value! How do I go about telling excel to select the value from the list instead of overwriting the current selection? Here is what the macro looks like as of right now... Sub ClassDescriptionSync() With ActiveSheet.PivotTables("ClassDescTbl1") .ManualUpdate = True .PivotFields("Class Description").CurrentPage = ActiveSheet.Range("O2").Value .ManualUpdate = False End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Missing values from a pivot table field | Excel Worksheet Functions | |||
Pivot table not recognizing same field values | Excel Discussion (Misc queries) | |||
Pivot Table Field Values not sorted | Excel Discussion (Misc queries) | |||
clearing pivot table field values | Excel Programming | |||
DeSelect certain values in row pivot field | Excel Programming |