I have an excel spreadsheet containing around 15 excel DCT.
On that sheet, there is a drop down menu allowing selecting a username, and when changing the value, a macro updates all the DTC present on the spreadsheet with the username and refreshes the data.
Problem is that now for any reason, it crashes excel except on high perf computer.
I don't know what to do
Here is the macro :
Dim pt As PivotTable
Dim pi As PIVOTITEM
Dim strField As String
strField = "Cslts"
On Error Resume Next
'Application.EnableEvents = False
'Application.ScreenUpdating = False
If Target.Address = Range("H1").Address Then
For Each pt In ActiveSheet.PivotTables
For Each pi In .PivotItems
If pi.Value = Target.Value Then
.CurrentPage = Target.Value