title: VBA PivotTableWizard Object
body: <p>I created a subroutine based off of the example VBA code on Microsoft's tutorial page: <a href="http://msdn.microsoft.com/en-us/library/office/hh243933.aspx" rel="nofollow">LINK</a></p>
  
  <pre><code>Sub WIP20Pivot()
  '
  ' Pivot Macro
  
  'Creates a PivotTable report from the table on Sheet1
  'by using the PivotTableWizard method with the PivotFields
  'method to specify the fields in the PivotTable.
   Dim objTable As PivotTable, objField As PivotField
  
  ' Select the sheet and first cell of the table that contains the data.
   ActiveWorkbook.Sheets("DATA").Select
   Range("A1").Select
  
  ' Create the PivotTable object based on the Employee data on Sheet1.
   Set objTable = Sheet1.PivotTableWizard 'ERROR OCCURS HERE
   ActiveSheet.Name = "PivotSheet" 
  
  'There is more VBA code below to select fields for the pivot table, etc..
  
  End Sub
  </code></pre>
  
  <p>And I receive the following error, when I run this code:</p>
  
  <blockquote>
    <p>Run-time error '424': "Object required".</p>
  </blockquote>
  
  <p>What's strange is that the subroutine works perfectly fine in Microsoft's downloadable example macro on their tutorial page. </p>
  
  <p>Thanks in advance for you help!</p>
  
  <p>Thanks,
  AME</p>