usmanhussain13
New Member
- Joined
- Jan 29, 2019
- Messages
- 11
Hi All,
Im not really an expert with coding VBA and hence rely on recording Macros.
I have one macro which i awlays run but for some reason today i keep getting an error message as per below.
"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.
When i debug the above, it points to the below. Can anyone advise what is wrong with this? confused as this always works!
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet!R1C1:R1048576C134", Version:=6).CreatePivotTable TableDestination:= _
"Sheet1!R3C1", TableName:="BrokerPSETResends", DefaultVersion:=6
Thanks,
Usman
Im not really an expert with coding VBA and hence rely on recording Macros.
I have one macro which i awlays run but for some reason today i keep getting an error message as per below.
"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.
When i debug the above, it points to the below. Can anyone advise what is wrong with this? confused as this always works!
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet!R1C1:R1048576C134", Version:=6).CreatePivotTable TableDestination:= _
"Sheet1!R3C1", TableName:="BrokerPSETResends", DefaultVersion:=6
Thanks,
Usman