Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default HELP: Error Occurs With Macro Making a Pivot Field Visible

Hi All,

In code is the following line:

Sheets("Pivot").PivotTables("PivotTable3").PivotFi elds("AS_AT").PivotItems(lastDay).Visible
= True

Where lastday is a string of the last day of the previous month and is a
valid pivot table field - when recorded the macro actually records the above
line except the car lastday is the actual name.

However, every time this code is run an error occurs - Run Time Error 1004:
Unable to get the PivotItems property of the PivotField class.

Even when reocrding and re-running the recorded macro the same error occurs,
which is bizarre seeming excel provided the code itself.

This is in Excel 2007.

If anybody is able to assist fix or work around this error, it would be
greatly appreciated.

Thank you in advance.

Regards,
Clint

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Programming 0 May 3rd 08 01:03 AM
Error 400 on making row visible on a protected sheet [email protected] Excel Programming 3 February 24th 06 12:07 AM
Macro for making worksheets visible. LDanix Excel Programming 7 October 29th 04 11:32 AM


All times are GMT +1. The time now is 10:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"