simplify code
Untested:
Public Sub refresh_Charts()
Dim ws As Worksheet
Dim vUsers As Variant
Dim vTables As Variant
Dim i As Long
vTables = Array("Program", "Origin", "DestRegion", "LSP")
With Worksheets("User")
vUsers = .Range("H10:H13").Value
For Each ws In Worksheets(Array("60D_Trend", _
"Month_Trend", "CT_60Days", "DestMix_60D"))
With ws.PivotTables("PivotTable1")
For i = 0 To 3
With .PivotFields(vTables(i))
.ClearAllFilters
.CurrentPage = vUsers(1, i + 1)
End With
Next i
End With
Next ws
.Select
End With
End Sub
In article ,
C02C04 wrote:
I'm developing a report and have put some very simple codes together. Can
someone help to simplify?
|