F
Fei
Hi all,
When I run my VBA, there was a message:
"Run-Time Error '1004':
The pivotTable field name is not valid. To create a pivottable report,
you must use data that is organized as a list with labeled columns. If
you are changing the name of a pivottable field, you must type a new
name for the field."
It occurred when running:
Set PTCache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, _
SourceData:=PRange.Address)
Set PT = PTCache.CreatePivotTable(TableDestination:=shhet1.Range
("A1"), _
TableName:="PovitTable1")
Any help is appreciated
Fei
When I run my VBA, there was a message:
"Run-Time Error '1004':
The pivotTable field name is not valid. To create a pivottable report,
you must use data that is organized as a list with labeled columns. If
you are changing the name of a pivottable field, you must type a new
name for the field."
It occurred when running:
Set PTCache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, _
SourceData:=PRange.Address)
Set PT = PTCache.CreatePivotTable(TableDestination:=shhet1.Range
("A1"), _
TableName:="PovitTable1")
Any help is appreciated
Fei