Sorry Ashish. Step 1 did not fix the issue, I still get the same
Error.

On Mar 5, 9:24 pm, Ashish Jain <26may.1...@gmail.com> wrote:
> Hi ccraif,
>
> Some check points for you, please try and revert back to us.
>
> 1. Try this(below) - Focus on _ (Underscore) in the end preceded by a
> spacebar.
>
> ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=
> _
> "B3 Production Input!R1C1:R111C7", Version:=xlPivotTableVersion12). _
> CreatePivotTable TableDestination:="B3 Yield Report!R3C1", TableName:=
> _
> "PivotTable8", DefaultVersion:=xlPivotTableVersion12
>
> 2. If it works, then good else Make sure that you're using
> i) Correct Sheet Names
>     a) B3 Production Input
>     b) B3 Yield Report
> ii) Correct Range Names
>     a) R1C1 - A1
>     b) R111C7 - G111
>     c) R3C1 - A3
>
> 3. Make sure target Cell A3 is empty (However this is not the root of
> error, since it says argument missing/invalid proc call).
> R111C7 - G111
>
> For more tips, tricks, downloads and problem solutions: visit 
> -->http://www.excelitems.com
> ------------------------------------------------------------------------
> Regards
> *Ashish **Jain*
> Analyst and Demand-Co-ordinator, CSC Australia
> Microsoft Certified Application (Excel) Specialist
> Technical Trainer - Excel and VBA
> Author ->www.excelitems.com
> 09999-40-48-43
> --------------------------------------------------------------------------- 
> -------------------------------------------------
> --------------------------------------------------------------------------- 
> -------------------------------------------------
>
> On Mar 5, 7:03 pm, ccraiff <ccra...@gmail.com> wrote:
>
> > I  have recorded a macro using Excel 2007 macro recorder. This macro
> > selects a certain range, and then creates and places a Pivot Table on
> > a different sheet. I figured using record it would work, but with out
> > any changes to the macro, I get a Runtime Error 5 (Invalid Procedure
> > or Argument). I shouldn't get this error, since it is a recorded
> > macro, but I need help figuring out what is wrong. Here is the macro:
>
> > Sub Macro15()
> > '
> > ' Macro15 Macro
> > '
>
> > '
> > Sheets("B3 Production Input").Select
> > Range("A1").Select
> > Range(Selection, Selection.End(xlToRight)).Select
> > Range(Selection, Selection.End(xlDown)).Select
>
> > ' *** Below is where it errors out ***
>
> > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=
> > _
> > "B3 Production Input!R1C1:R111C7", Version:=xlPivotTableVersion12). _
> > CreatePivotTable TableDestination:="B3 Yield Report!R3C1", TableName:=
> > _
> > "PivotTable8", DefaultVersion:=xlPivotTableVersion12
>
> > '*** End of Error ***
>
> > Sheets("B3 Yield Report").Select
> > Cells(3, 1).Select
> > ActiveSheet.PivotTables("PivotTable8").Name = "B3 Yield Input"
> > ActiveSheet.PivotTables("B3 Yield Input").AddDataField
> > ActiveSheet.PivotTables( _
> > "B3 Yield Input").PivotFields("Run #"), "Sum of Run #", xlSum
> > ActiveSheet.PivotTables("B3 Yield Input").AddDataField
> > ActiveSheet.PivotTables( _
> > "B3 Yield Input").PivotFields("Total BF"), "Sum of Total BF", xlSum
> > With ActiveSheet.PivotTables("B3 Yield Input").PivotFields("Sum of Run
> > #")
> > .Orientation = xlRowField
> > .Position = 1
> > End With
> > With ActiveSheet.PivotTables("B3 Yield Input").PivotFields("Sum of
> > Total BF")
> > .Caption = "Total Input BdFt"
> > .NumberFormat = "#,##0.000"
> > End With
> > ActiveSheet.PivotTables("B3 Yield Input").CompactLayoutRowHeader =
> > "Run #"
> > Range("D3").Select
> > End Sub
>
> > Please assist.

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to