Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • what is the value of LastRow ? LastRow should also be LastRow = wsData.Cells(wsData.Rows.Count, 1).End(xlUp).Row Commented Apr 12, 2017 at 18:35
  • I fixed this part and this was not the problem, the "set PT_Cache" still got the error.... Commented Apr 12, 2017 at 18:37
  • have you read my answer and tested the code below ? Commented Apr 13, 2017 at 3:12
  • @ShaiRado Yes! I just tried! It works! But I'm keep running into problems as I adding more code, I'm able to create a empty pivot table with your code, after I added some values field, it tells me that I have error with the previous code.... Commented Apr 13, 2017 at 17:10
  • Then you should open a new post, with your modified code, and describe what you are trying to achieve. Commented Apr 13, 2017 at 17:12