Someone Please Help with pivot table macro

vash

New Member
Joined
Jun 10, 2003
Messages
4
Could Someone tell me what is wrong with the following lines of code.

Activesheet.PivotTables("PivotTable2").PivotFields("Upd_date").Name = "Daily"
ActiveSheet.PivotTables("PivotTable2").PivotFields("Week_Desc").Name = "weekly"

i wrote these lines of code in Excel 97 and they worked fine, but upon opening them in Excel 2000 i get the following error in my Pivottable

Run-Time error '1004'
Unable to set the Name Property of the PivotField class

and when i went to the debugger it pointed to the second line of this code. So i commented that line out and got the following error

Run-Time error '1004'
Unable to set PivotField Property of the PivotTables class

coudl someone please help me, is there something that i am missing since i got excel 2000, do they use a different name now or something... or whats wrong...im completely stuck.

Edited to make the topic more informative. ~ Von Pookie
 

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
Re: Someone Please Help

You could try Macro Recorder and see what code it provides.

I do not have both versions of Excel at hand.
 
Upvote 0
I've used pivot table macros written in Excel 97 on Excel 2000 with no difficulty.

Why don't you post the entire script dealing with the pivot table commands. I can run them in Excel 97 and 2000 to see what may be wrong.

Regards,

Joe
 
Upvote 0

Forum statistics

Threads
1,221,539
Messages
6,160,413
Members
451,644
Latest member
hglymph

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