- Joined
- Feb 8, 2002
- Messages
- 3,392
- Office Version
- 365
- Platform
- Windows
This is driving me crazy. This line of code is working in Excel 2002, and failing in Excel 2000.
Dim PTCache as PivotCache
Set MyRange = Range("StyleCache")
Set PTCache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlDataBase, SourceData:=MyRange)
It is failing with Run Time Error '5': Invalid Procedure Call or Argument.
What the heck?
There are only 2 arguments.
xlDataBase has a value of 1 in both systems.
MyRange is valid, has 3 columns, with headings of Store, Style, "Sales 7", and 330 rows of data.
Any ideas?
Bill
Dim PTCache as PivotCache
Set MyRange = Range("StyleCache")
Set PTCache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlDataBase, SourceData:=MyRange)
It is failing with Run Time Error '5': Invalid Procedure Call or Argument.
What the heck?
There are only 2 arguments.
xlDataBase has a value of 1 in both systems.
MyRange is valid, has 3 columns, with headings of Store, Style, "Sales 7", and 330 rows of data.
Any ideas?
Bill