It seems like all of the examples from other people are just like what I already have in my code. But in my case, nothing resolves the problem. So here is the complete code alon
If you add this to your script in place of the error'd lines you'll get all their names and add then to the pivot:
For Each p In pt.PivotFields Debug.Print p.Name pt.AddDataField p,,xlSum Next
I'm sure this will get you over the line. :)