Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
st st is offline
external usenet poster
 
Posts: 3
Default How do I change the date in a pivot table pagefield using VBA

My pivot table shows one day's worth of data. I have multiple
departmenst in the rows, and 3 categories of expenditures in the
columns. I use the Page area to show a date. How do I use VBA to
change the date to today()-1 (yesterday).

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
st st is offline
external usenet poster
 
Posts: 3
Default How do I change the date in a pivot table pagefield using VBA

I defined the date I want to use w/ dim and then used this code:

Dim pvtdate as date

pvtdate = Worksheets("By Trade").Range("d75").Text

ActiveSheet.PivotTables("PivotTable1").PivotCache. refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields ("DT_TRANS_DATE"). _
CurrentPage = pvtdate

st wrote:
My pivot table shows one day's worth of data. I have multiple
departmenst in the rows, and 3 categories of expenditures in the
columns. I use the Page area to show a date. How do I use VBA to
change the date to today()-1 (yesterday).

Thanks

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
Pivot Table Change to US Date Format - Why? Louise Excel Discussion (Misc queries) 2 April 26th 10 01:04 PM
DATE FORMAT CHANGE FROM EXCEL WORKSHEET TO PIVOT TABLE Wendy Excel Discussion (Misc queries) 0 November 19th 08 12:54 AM
how to change date formating-grouped by month in pivot table Yahýa Excel Discussion (Misc queries) 4 June 24th 06 09:15 AM
Pivot Table PageField Todd Huttenstine Excel Programming 4 April 21st 04 09:46 PM
How to find the current pagefield of a pivot table? Tama Excel Programming 0 December 22nd 03 05:00 AM


All times are GMT +1. The time now is 01:07 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"