Excel 2003 VBA crashes Excel 2007?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #16
    Strange, error 0 would actually mean no error. I haven't used pivot tables, so my only guess would be to make sure that "Data" and "Sum of Amount" do actually exist.

    Comment

    • newnewbie
      New Member
      • Nov 2006
      • 54

      #17
      [IMG]C:\Documents and Settings\lskals ka\Desktop\Erro r.jpg[/IMG]

      Comment

      • newnewbie
        New Member
        • Nov 2006
        • 54

        #18
        [IMG]C:\Documents and Settings\lskals ka\Desktop\erro r2.jpg[/IMG]

        Comment

        • newnewbie
          New Member
          • Nov 2006
          • 54

          #19
          Ok, thank you everybody. I have until next Wed to resolve this or else I will have to format close to a hundred pivots by hand :)

          Comment

          • newnewbie
            New Member
            • Nov 2006
            • 54

            #20
            I did it!
            Old code line 59-60:
            ActiveSheet.Piv otTables("Pivot Table1").PivotF ields("Data").P ivotItems( _
            "Sum of Amount").Name = "Revenue Report"

            New code (changes in bold):

            ActiveSheet.Piv otTables("Pivot Table1").DataPivotField.PivotItems("Su m of Amount").Caption = "Revenue Report"

            THANK YOU ALL!

            Comment

            • ChipR
              Recognized Expert Top Contributor
              • Jul 2008
              • 1289

              #21
              Glad to hear you figured it out. I'm sure other people will have the same problem, and your solution will help them.

              Comment

              • newnewbie
                New Member
                • Nov 2006
                • 54

                #22
                Now I know how to use the errorhandler :)
                Thanks!

                Comment

                Working...