Hi,
I have one source sheet with data and I want to create multiple pivot tables based on it with varying filters.
This normally works fine, but when trying to create the same pivot table twice it causes this error: "Run-time error '5': Invalid procedure or argument"
The debugger marks this line: Set pvt = Worksheets(SheetName).PivotTables.Add(pvtCache, Range(StartPvt), PivotName)
I have tried deleting the worksheet containing the pivot table and then constructing it again, but it doesn't seem to help.
Do you have some suggestion why this error is caused and how to prevent it?
Bookmarks