Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)

    Dim 피벗 As PivotTable
    Dim 필드 As PivotField, 수정필드 As PivotField
    Dim 항목 As PivotItem
    Dim 다중선택여부 As Boolean
    
    On Error Resume Next
    
    Application.EnableEvents = False
    
    For Each 수정필드 In Target.PageFields
        
        다중선택여부 = 수정필드.EnableMultiplePageItems
        
        For Each 피벗 In ActiveSheet.PivotTables
            
            If 피벗.Name <> Target.Name Then
                
                피벗.ManualUpdate = True
                
                Set 필드 = 피벗.PivotFields(수정필드.Name)
                        
                With 필드
                
                    .ClearAllFilters
                    
                    If 다중선택여부 = False Then
                        
                        .CurrentPage = 수정필드.CurrentPage.Value
                        
                    Else
                            
                        .CurrentPage = "(모두)"
                            
                        For Each 항목 In 수정필드.PivotItems
                            
                            .PivotItems(항목.Name).Visible = 항목.Visible
                        
                        Next
                        
                        .EnableMultiplePageItems = 다중선택여부
                    
                    End If
                    
                End With
                
                피벗.ManualUpdate = False
                
            End If
            
        Next
    
    Next
    
    Application.EnableEvents = True

End Sub
