Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing values from a pivot table field Kelli[_2_] Excel Worksheet Functions 1 April 27th 10 07:44 PM
Pivot table not recognizing same field values neilmber Excel Discussion (Misc queries) 1 May 8th 08 01:19 AM
Pivot Table Field Values not sorted pepperds Excel Discussion (Misc queries) 1 February 16th 07 08:16 PM
clearing pivot table field values graham Excel Programming 1 June 24th 04 10:35 AM
DeSelect certain values in row pivot field Todd Huttenstine Excel Programming 0 May 20th 04 05:01 PM


All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"