We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Dim arrColumns Dim nColumns As Integer Dim wsReport, wsData As Worksheet Dim pvtTable As PivotTable Application.ScreenUpdating = False Set wsReport = Worksheets(sReportType) Set wsData = Worksheets(sReportType & "Query") theDataSource = sReportType & "Results" 'Put the Column Headings of the Query Results into an array wsData.Select col = Range("A1").End(xlToRight).Select nColumns = Selection.Column ReDim arrColumns(nColumns - 1) For i = 0 To nColumns - 1 arrColumns(i) = Cells(1, i + 1).Value Next 'Clear the old pivot table and place the pivot table fields wsReport.Select Set pvtTable = wsReport.Range("A10").PivotTable pvtTable.ClearTable 'this is the line that causes the message
Add your voice to the tech community where 5M+ people just like you are talking about what matters.