¡Hello people of Excelforum! I really need your help if someone knows how to do what I need to...
On the dummy archive I uploaded I have 3 PivotTables in 3 different sheets and a command button to open Userform1 that contains 15 checkbox.
What I need to accomplish is after selecting the checkboxes and clicking the "Ok" command button of the archive, the 3 PivotTables get arranged simultaneously with the values selected on the UserForm1.
Main Goal Select in the PivotTables the Months and Years selected on the Userform1
The Dummy Archive has all the codes erased because i couldn't find the solution.
I Just need this thing to finish my job 
I've tried some attempts but failed completely. The one posted below fails as it doesn't recognize the variable "PT" as the PivotTable.
Sub fail_attempt ()
Dim ws As Worksheet
Dim Z As Integer
Dim PT As PivotTable
For Each ws In Worksheets
Z = 1 + Z
For Each PT In ws.PivotTables
If Checkbox2013.value = 0 Then
With ActiveSheet.PivotTables(PT).PivotFields("Year")
.PivotItems("2012").Visible = False
If Checkbox2014.value = 0 Then
With ActiveSheet.PivotTables(PT).PivotFields("Year")
.PivotItems("2013").Visible = False
'etcetera for all the rest of the buttons failed completely :(
End With
Next PT
Next ws
End sub
Any input would be apreciated. I think it's easy to do it, but i'm just learning to code on VBA 
Cool forums you have here. Been surfing it for the last days and helped me a lot :P
Bookmarks