VBA Error: Run time error 1004

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
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
check if all columns in the range you are using have unique labels in Row1 - if one is missing (or if you have duplicates) you may get such an error
 
Upvote 0

Forum statistics

Threads
1,224,747
Messages
6,180,708
Members
452,994
Latest member
Janick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top