'Some users can run the VBA and others get the error "subscript out of range"
It's my first time using VBA, so, I'm not sure if I'm going to explain my issue in the best way. So, I have a pivot table that should be updated using the VBA code, however, every time I try to run it, it shows an error "subscript out of range". What is strange is that some people in my company can run it and we have access to the same databases. I'm not sure I was able to run it some months ago but I know that a colleague was and now, he is getting the same error and we didn't change the code. I believe that all of us have the same power pivot version. When I debut the code, it failed in the next part:
' Update pivot table
Sheets("Pivot").Activate
Sheets("Pivot").Range("E6").Select
ActiveWorkbook.ShowPivotTableFieldList = True
**ActiveSheet.PivotTables("BM_Pivot").CubeFields.GetMeasure _
"[" & dppNameStr & "].[TOTAL_ARREARS]",xlSum, "Sum of TOTAL_ARREARS"**
I am sure that the code is correct since some people can run it...Does someone know how to solve this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
