+ Reply to Thread
Results 1 to 3 of 3

getting error 1004 "Application defined or object defined error

  1. #1
    Registered User
    Join Date
    07-08-2014
    Location
    Texas
    MS-Off Ver
    2013
    Posts
    40

    getting error 1004 "Application defined or object defined error

    Please help.

    I am getting the referenced error when running this code. I have checked the name of my pivot table and pivotfield. The pivotfield is a pivot filter item I have another code with the exact same setup for another field and it works perfectly..

    Sub Building1_Change()
    Dim ChartType As String
    Dim WS As Worksheet
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    With ActiveSheet.PivotTables("Actual1").PivotFields("Building_COID").CurrentPage = ClearAllFilters
    Worksheets("Sheet2").PivotTables("Actual1").PivotFields("Building_COID").CurrentPage = Range("AB1").Text
    Worksheets("Sheet2").PivotTables("Budget1").PivotFields("Bud coid").CurrentPage = Range("AB1").Text
    Worksheets("Sheet2").PivotTables("Projection").PivotFields("Building_ID").CurrentPage = Range("AB1").Text
    End With
    End Sub

  2. #2
    Registered User
    Join Date
    07-08-2014
    Location
    Texas
    MS-Off Ver
    2013
    Posts
    40

    Re: getting error 1004 "Application defined or object defined error

    Sub Building1_Change()
    Dim ChartType As String
    Dim WS As Worksheet
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    With ActiveSheet.PivotTables("Actual1").PivotFields("Building_COID").CurrentPage = ClearAllFilters
    Worksheets("Sheet2").PivotTables("Actual1").PivotFields("Building_COID").CurrentPage = Range("AB1").Text
    Worksheets("Sheet2").PivotTables("Budget1").PivotFields("Bud coid").CurrentPage = Range("AB1").Text
    Worksheets("Sheet2").PivotTables("Projection").PivotFields("Building_ID").CurrentPage = Range("AB1").Text
    End With
    End Sub
    Last edited by The Fly; 08-08-2014 at 09:40 AM. Reason: SOLVED

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: getting error 1004 "Application defined or object defined error

    Please wrap your code with code tags as per forum's 3 rule.
    Do you have a table name Projection?

  4. #4
    Registered User
    Join Date
    07-08-2014
    Location
    Texas
    MS-Off Ver
    2013
    Posts
    40

    Re: getting error 1004 "Application defined or object defined error

    I solved my own question.. Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Run time error:1004 "Application defined or Object defined error"
    By mvneema in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-07-2014, 09:47 AM
  2. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  3. Error When Implementing Code: "1004 - Application-defined or object-defined error"
    By blueblazingdemon in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-10-2013, 11:21 AM
  4. Replies: 1
    Last Post: 05-06-2013, 06:07 AM
  5. Replies: 2
    Last Post: 09-12-2012, 01:01 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1