Runtime error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Excel 2000 Visual Basic 6.
I have a workbook containing Pivot Tables and Charts. The page headers are controlled through buttons/macros. Occassionally I get the following error message run-time error '1004' unable to set the _Default property of the Pivot Item class. Debugging the cod
ActiveChart.PivotLayout.PivotFields(Y).CurrentPage =
X and Y being the parameters passed

On examination of the Pivot Chart, either shows (1) corrupted pagefield list - items missing or duplicated - cleared by dragging all fields back to the pivot toolbar, selecting refresh and dragging back onto the chart or (2) the list looks perfectly normal and you can manually select

Any suggestions
 
Thanks, I've used Debra's code which cleared the duplcated entries - also found the other reason for not setting default value - I'd stripped a space character from a string, so I passed "xxx/yyy" to the procedure, and the page field wa
"xxx/ yyy" - don't I feel foolish - it only came to light when I started using DCOUNT function and cut/pasting values into the criteria

Thanks for all your hel

----- Dave Peterson wrote: ----

Maybe you could use some of the code at Debra Dalgleish's to clean up tha
pagefield list--then run your code

http://www.contextures.com/xlPivot04.htm

mike wrote
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top