Microsoft 365 VBA-synchro slicer differentes feuilles ( differents sources ).

almourasel

XLDnaute Occasionnel
salut les amis

j'ai ce code qu fait la synchornisation entre les slicers mais le problème qu'il est un peu lourd , est ce qu il ya un moyen de le modifier pour que son excusion sera plus rapide ?

il consomme de temps qu'on je filtre avec SC3 et SC4.

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)

Dim sc1 As SlicerCache
Dim sc2 As SlicerCache
Dim SI1 As SlicerItem
Dim sc3 As SlicerCache
Dim sc4 As SlicerCache
Dim SI3 As SlicerItem

' These names come from Slicer Settings dialog box
Set sc1 = ThisWorkbook.SlicerCaches("Slicer_line")
Set sc2 = ThisWorkbook.SlicerCaches("Slicer_line1")
Set sc3 = ThisWorkbook.SlicerCaches("Slicer_Drawg")
Set sc4 = ThisWorkbook.SlicerCaches("Slicer_DRW")

Application.ScreenUpdating = False
Application.EnableEvents = False

sc2.ClearManualFilter
sc4.ClearManualFilter

For Each SI1 In sc1.SlicerItems
sc2.SlicerItems(SI1.Name).Selected = SI1.Selected
Next SI1

For Each SI3 In sc3.SlicerItems
sc4.SlicerItems(SI3.Name).Selected = SI3.Selected
Next SI3

Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
 

almourasel

XLDnaute Occasionnel
ici total c est 55 .

1598883086832.png
 

almourasel

XLDnaute Occasionnel
Salut,

quand je filtre pour PR1 et DRW A1775400541 il affiche 3 infos au graph "this week production by Drawg ".

je veux pas te fatiguer encore Daniel , merci d'avance et on arrête.

1598886416834.png


le problème avec le nombre d'infos que mon fichier contient .

merci de nouveau.
 

Statistiques des forums

Discussions
312 275
Messages
2 086 707
Membres
103 377
dernier inscrit
fredy45