title: VBA problem with object in get date from pivot
body: <p>I wanted to get data from a pivot table using the getdate pivot function. However, I get &quot;Application - definied or object - definied error&quot; . I want to take &quot;Suma końcowa&quot; and paste it in the E20 field.</p>
  <pre><code>Dim ptAs PivotTable
  Set pt = wbMe.Sheets(&quot;RES_MAT&quot;).PivotTables(&quot;Tabela przestawna&quot;)
  wbMe.Sheets(&quot;RES_MAT&quot;).Range(&quot;E20&quot;) = pt.GetPivotData(&quot;Suma z WYCENA_PLN&quot;, &quot;Suma końcowa&quot;).Value
  </code></pre>
  <p><a href="https://i.stack.imgur.com/jyMIO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jyMIO.png" alt="enter image description here" /></a></p>