ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Pivot Tables (https://www.excelbanter.com/charts-charting-excel/51986-pivot-tables.html)

dok112

Pivot Tables
 

I have a userform, and it has 2 textboxes, is there a way that I can
write a macro that will only display that data on a pivot table between
the 2 dates entered in these textboxes?

Right now I have the below, but I don't want to have to have all the
dates written like this.

With thisworkbook.sheets("CARS Survey Results by
Date").PivotTables("PivotTable2").PivotFields("Dat e")
.PivotItems("9/28/2005").Visible = True
.PivotItems("9/29/2005").Visible = True
.PivotItems("9/30/2005").Visible = True
End With

I would like to enter "9/28/2005" in textbox1 & "9/30/2005" in textbox
2 and have it display only these results.

Any help will be greatly appreciated.


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=478830


dok112

Pivot Tables
 

I think this will be better suited for the programming board...so I will
post it there instead. ~Thanks~


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=478830



All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com