Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Excel 2007: Pivot tables "Invalid procedure call or argument"

Hi all

I'm having problems with pivot tables and coding that worked fine in
XL03 but is failing in XL07. My code fails when I attempt to set the
CurrentPage. I can manually change the CurrentPage to the value that
my code is attempting, and then the code works. I can manually change
the CurrentPage back again to its original value and the code works
again. It makes no sense why it's not working.

The line of code failing is this:

pt.PivotFields("Month").CurrentPage = CStr(12)

Thanks in advance

Paul Martin
Melbourne, Australia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2007: Pivot tables "Invalid procedure call or argument"

Try the following:

pt.PivotFields("Month").CurrentPage = CStr(12) & Chr(0)

On Tuesday, January 12, 2010 3:11 PM Paul Martin wrote:


Hi all

I am having problems with pivot tables and coding that worked fine in
XL03 but is failing in XL07. My code fails when I attempt to set the
CurrentPage. I can manually change the CurrentPage to the value that
my code is attempting, and then the code works. I can manually change
the CurrentPage back again to its original value and the code works
again. It makes no sense why it is not working.

The line of code failing is this:

pt.PivotFields("Month").CurrentPage = CStr(12)

Thanks in advance

Paul Martin
Melbourne, Australia



Submitted via EggHeadCafe
Microsoft LINQ Query Samples For Beginners
http://www.eggheadcafe.com/training-...Operators.aspx

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
Excel 2007 Macro w/ AppActivate = Run-time error '5': Invalid procedure call or argument Per Moeller-Olsen Excel Programming 4 April 27th 09 10:38 PM
Export to excel via webpage: "Invalid Procedure Call or Argument" Bruno Excel Programming 0 March 19th 08 11:55 AM
Invalid Procedure call or Argument when Export to Excel via web pa Bruno Excel Programming 0 March 18th 08 02:55 PM
Pivot Table Creation Macro fails with Error #5 "Invalid procedure call or argument" [email protected] Excel Programming 1 July 10th 07 08:01 PM
bizarre "invalid procedure call" error PatFinegan[_14_] Excel Programming 11 July 13th 04 07:56 PM


All times are GMT +1. The time now is 06:22 PM.

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

About Us

"It's about Microsoft Excel"