ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro for Pivot Table - Apply to multiple workbooks (https://www.excelbanter.com/excel-programming/271593-re-macro-pivot-table-apply-multiple-workbooks.html)

Nathan Schlaud

Macro for Pivot Table - Apply to multiple workbooks
 
Tom,
I am having problems running this macro on Excel 97.
Excel 97 doesn't recognize the
workbook/worksheets/pivottablewizard names that I have
coded below. Could you please give me some advise as to
how I could get Excel 97 to recognize the coding below.
Thanks again.

Dim rng As Range
Set rng = ActiveWorkbook.Worksheets
("POSTEDBYJOURNAL").Range("A7").CurrentRegion
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
SourceData:= _
rng.Address(True, True, xlR1C1,
True)).CreatePivotTable TableDestination:="", TableName _
:="PivotTable1"
ActiveSheet.PivotTableWizard
TableDestination:=ActiveSheet.Cells(3, 1)
ActiveSheet.Cells(3, 1).Select


-----Original Message-----
Tom,
Thank you for your response. This is exactly what I

needed!

Thanks again,
Nathan


*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.



All times are GMT +1. The time now is 02:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com