![]() |
Named argument not found
When I run the following I obtain message "named argument not found" I think the problem arises on : DefaultVersion:=xlPivotTableVersion10 MAny thanks Sub test() x = Range("A50000").End(xlUp).Row y = Range("IV1").End(xlToLeft).Column Range("A1").Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData: _ "Original!" & Cells(x, 1).Address & "," & Cells(1 y).Address).CreatePivotTable TableDestination:="", TableName:= _ "PivotTable1", DefaultVersion:=xlPivotTableVersion10 ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3 1) ActiveSheet.Cells(3, 1).Select ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:="Cat4" _ ColumnFields:="Account" ActiveSheet.PivotTables("PivotTable1").PivotFields ("Amount").Orientatio = _ xlDataField ActiveWorkbook.ShowPivotTableFieldList = True ActiveSheet.Name = "Check" End Sub DefaultVersion:=xlPivotTableVersion1 -- T De Villier ----------------------------------------------------------------------- T De Villiers's Profile: http://www.excelforum.com/member.php...fo&userid=2647 View this thread: http://www.excelforum.com/showthread.php?threadid=56441 |
Named argument not found
what version of excel is having the problem. Version 10 is xl2002.
Try recording a macro in the older version and see what arguments it supports. -- Regards, Tom Ogilvy "T De Villiers" wrote: When I run the following I obtain message "named argument not found" I think the problem arises on : DefaultVersion:=xlPivotTableVersion10 MAny thanks Sub test() x = Range("A50000").End(xlUp).Row y = Range("IV1").End(xlToLeft).Column Range("A1").Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "Original!" & Cells(x, 1).Address & "," & Cells(1, y).Address).CreatePivotTable TableDestination:="", TableName:= _ "PivotTable1", DefaultVersion:=xlPivotTableVersion10 ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1) ActiveSheet.Cells(3, 1).Select ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:="Cat4", _ ColumnFields:="Account" ActiveSheet.PivotTables("PivotTable1").PivotFields ("Amount").Orientation = _ xlDataField ActiveWorkbook.ShowPivotTableFieldList = True ActiveSheet.Name = "Check" End Sub DefaultVersion:=xlPivotTableVersion10 -- T De Villiers ------------------------------------------------------------------------ T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479 View this thread: http://www.excelforum.com/showthread...hreadid=564414 |
All times are GMT +1. The time now is 01:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com