MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Code for Pivot table date change

  Asked By: Emily    Date: Nov 25    Category: MS Office    Views: 789

I have a data base in excel has coloumns Date, Item, Op stock, Sales,
Production and Closing stock. I have created Pivot table and I wish
to create a periodical report on the transactions. I wish someone
could help to create VBA code which will clear off the existing Pivot
table and take the staring date and end date from a User form and
refresh with respect to the new dates.



1 Answer Found

Answer #1    Answered By: Dot net Sachin     Answered On: Nov 25

code to delete all pivot  tables in a workbook
Sub DelPivots()
Dim wks1 As Worksheet
Dim pvtTables As PivotTables
Dim pvtTable As PivotTable

For Each wks1 In ActiveWorkbook.Worksheets
For Each pvtTable In wks1.PivotTables
End Sub

Didn't find what you were looking for? Find more on Code for Pivot table date change Or get search suggestion and latest updates.