<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://excelusergroup.org/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>VBA</title><link>http://excelusergroup.org/forums/15.aspx</link><description>VBA discussions</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>Re: Error when selecting page itme from pivot table - Runtime error 5 - Invalid Procedure Call or Argument</title><link>http://excelusergroup.org/forums/thread/7948.aspx</link><pubDate>Mon, 14 Feb 2011 20:23:31 GMT</pubDate><guid isPermaLink="false">afdc21cc-1618-45b1-a950-e47bb94e6e94:7948</guid><dc:creator>Uli</dc:creator><slash:comments>0</slash:comments><comments>http://excelusergroup.org/forums/thread/7948.aspx</comments><wfw:commentRss>http://excelusergroup.org/forums/commentrss.aspx?SectionID=15&amp;PostID=7948</wfw:commentRss><description>&lt;p&gt;I know the answer is late and I don&amp;#39;t know whether the issue is already fixed but:&lt;/p&gt;
&lt;p&gt;To me it appears like a MS programming error. I have that problem in a loop that runs from 1 to 8 each time changing the .CurrentPage accordingly. 1 and 3 to 8 work fine, two causes the above mentioned error! Changing the value to 2 manually of course works fine. It just doesn&amp;#39;t work from within the VBA code...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Uli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Error when selecting page itme from pivot table - Runtime error 5 - Invalid Procedure Call or Argument</title><link>http://excelusergroup.org/forums/thread/7629.aspx</link><pubDate>Wed, 20 Oct 2010 03:19:53 GMT</pubDate><guid isPermaLink="false">afdc21cc-1618-45b1-a950-e47bb94e6e94:7629</guid><dc:creator>Omar</dc:creator><slash:comments>0</slash:comments><comments>http://excelusergroup.org/forums/thread/7629.aspx</comments><wfw:commentRss>http://excelusergroup.org/forums/commentrss.aspx?SectionID=15&amp;PostID=7629</wfw:commentRss><description>&lt;p&gt;I watched the video. He had a slight difference from your code.&lt;/p&gt;
&lt;p&gt;ActiveSheet.PivotTables(&amp;quot;PivotTable6&amp;quot;).PivotFields(&amp;quot;Period&amp;quot;).CurrentPage = Range(&amp;quot;Start!d9&amp;quot;).TEXT&lt;/p&gt;
&lt;p&gt;Notice that you didn&amp;#39;t include that last .text in your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Error when selecting page itme from pivot table - Runtime error 5 - Invalid Procedure Call or Argument</title><link>http://excelusergroup.org/forums/thread/7628.aspx</link><pubDate>Wed, 20 Oct 2010 03:10:35 GMT</pubDate><guid isPermaLink="false">afdc21cc-1618-45b1-a950-e47bb94e6e94:7628</guid><dc:creator>Omar</dc:creator><slash:comments>0</slash:comments><comments>http://excelusergroup.org/forums/thread/7628.aspx</comments><wfw:commentRss>http://excelusergroup.org/forums/commentrss.aspx?SectionID=15&amp;PostID=7628</wfw:commentRss><description>&lt;p&gt;I believe this is the link: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.datapigtechnologies.com/flashfiles/pivot10.html"&gt;http://www.datapigtechnologies.com/flashfiles/pivot10.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Error when selecting page itme from pivot table - Runtime error 5 - Invalid Procedure Call or Argument</title><link>http://excelusergroup.org/forums/thread/7626.aspx</link><pubDate>Wed, 20 Oct 2010 00:33:41 GMT</pubDate><guid isPermaLink="false">afdc21cc-1618-45b1-a950-e47bb94e6e94:7626</guid><dc:creator>Jim Cone</dc:creator><slash:comments>0</slash:comments><comments>http://excelusergroup.org/forums/thread/7626.aspx</comments><wfw:commentRss>http://excelusergroup.org/forums/commentrss.aspx?SectionID=15&amp;PostID=7626</wfw:commentRss><description>&lt;p&gt;I am too, however the excel help file for &amp;quot;currentpage&amp;quot; says it is set to the name of the page you want, or it can be set to &amp;quot;All&amp;quot;.&lt;/p&gt;
&lt;p&gt;So that could translate to something like...&lt;br /&gt;ActiveSheet.PivotTables(&amp;quot;PivotTable6&amp;quot;).PivotFields(&amp;quot;Period&amp;quot;).CurrentPage =&amp;quot;Sludge&amp;quot;&lt;br /&gt;or&lt;br /&gt;ActiveSheet.PivotTables(&amp;quot;PivotTable6&amp;quot;).PivotFields(&amp;quot;Period&amp;quot;).CurrentPage = &amp;quot;All&amp;quot;&lt;/p&gt;
&lt;p&gt;Also, the link you provided is broken.&lt;br /&gt;&amp;#39;---&lt;br /&gt;Jim Cone&lt;br /&gt;Portland, Oregon USA&lt;br /&gt;&lt;a href="http://www.mediafire.com/PrimitiveSoftware"&gt;http://www.mediafire.com/PrimitiveSoftware&lt;/a&gt;&lt;br /&gt;(free and commercial excel programs)&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Error when selecting page itme from pivot table - Runtime error 5 - Invalid Procedure Call or Argument</title><link>http://excelusergroup.org/forums/thread/7624.aspx</link><pubDate>Tue, 19 Oct 2010 13:10:43 GMT</pubDate><guid isPermaLink="false">afdc21cc-1618-45b1-a950-e47bb94e6e94:7624</guid><dc:creator>lala14b</dc:creator><slash:comments>0</slash:comments><comments>http://excelusergroup.org/forums/thread/7624.aspx</comments><wfw:commentRss>http://excelusergroup.org/forums/commentrss.aspx?SectionID=15&amp;PostID=7624</wfw:commentRss><description>&lt;p&gt;anyone have any idea on this?&amp;nbsp; I am really stuck.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Error when selecting page itme from pivot table - Runtime error 5 - Invalid Procedure Call or Argument</title><link>http://excelusergroup.org/forums/thread/7608.aspx</link><pubDate>Thu, 14 Oct 2010 20:00:39 GMT</pubDate><guid isPermaLink="false">afdc21cc-1618-45b1-a950-e47bb94e6e94:7608</guid><dc:creator>lala14b</dc:creator><slash:comments>0</slash:comments><comments>http://excelusergroup.org/forums/thread/7608.aspx</comments><wfw:commentRss>http://excelusergroup.org/forums/commentrss.aspx?SectionID=15&amp;PostID=7608</wfw:commentRss><description>&lt;p&gt;Please help!&amp;nbsp; I have spent way too much time trying to figure this out, so I&amp;#39;m really hoping someone&amp;nbsp;can&amp;nbsp;help.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have recorded vb that changes a page item in a pivot table when selecting from a combo box - similar to this video. &lt;a href="http://www.datapigtechnologies.com/f...s/pivot10.html"&gt;http://www.datapigtechnologies.com/f...s/pivot10.html&lt;/a&gt;. The recorded code that vb gives me works only if it&amp;#39;s selecting the selection that was chosen when recorded or if it was manually selected right before I choose the drop down item. Otherwise, it gives an invalid procedure call or arguement - runtime error 5. This occurs in 2007 or compatibility mode. I think this is a new problem since it used to work okay for me. I don&amp;#39;t understand b/c this is what was recorded, and also is the same as in this video.&amp;nbsp; Does anyone know what&amp;#39;s going on??&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Some of my attempts at code:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Sub SelectPer2()&lt;br /&gt;&amp;#39;&lt;br /&gt;&amp;#39; SelectPer2 Macro&lt;br /&gt;&amp;#39;&lt;/p&gt;
&lt;p&gt;&amp;#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveSheet.PivotTables(&amp;quot;PivotTable6&amp;quot;).PivotFields(&amp;quot;Period&amp;quot;).CurrentPage = Range(&amp;quot;Start!d9&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;End Sub&lt;br /&gt;Sub Macro10()&lt;br /&gt;&amp;#39;&lt;br /&gt;&amp;#39; Macro10 Macro&lt;br /&gt;&amp;#39;&lt;/p&gt;
&lt;p&gt;&amp;#39;Sheets(&amp;quot;Rept Sch piv&amp;quot;).Select&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveSheet.PivotTables(&amp;quot;PivotTable6&amp;quot;).PivotFields(&amp;quot;Period&amp;quot;).CurrentPage = Range(&amp;quot;Start!d9&amp;quot;)&lt;br /&gt;End Sub&lt;br /&gt;Sub Macro11()&lt;br /&gt;&amp;#39;&lt;br /&gt;&amp;#39; Macro11 Macro&lt;br /&gt;&amp;#39;&lt;/p&gt;
&lt;p&gt;&amp;#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sheets(&amp;quot;Rept Sch piv&amp;quot;).Select&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveSheet.PivotTables(&amp;quot;PivotTable6&amp;quot;).PivotFields(&amp;quot;Period&amp;quot;).CurrentPage = Range(&amp;quot;a1&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveSheet.PivotTables(&amp;quot;PivotTable9&amp;quot;).PivotFields(&amp;quot;Quarter&amp;quot;).CurrentPage = _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;Q4&amp;quot;&lt;br /&gt;End Sub&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>