Results 1 to 12 of 12

Good old runtime error 5 question

Threaded View

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    Hartford CT
    MS-Off Ver
    Excel 2010
    Posts
    20

    Good old runtime error 5 question

    I have also posted this problem in another forum here:
    http://www.thecodecage.com/forumz/mi...post1055009266

    Anyone got any ideas here is my code:

    Its Breaking here:

    slcCache2.VisibleSlicerItems(slcItem1.Name).Selected = slcItem1.Selected
    Sub SynchSlicers3()
    
        Dim PT1 As PivotTable, PT2 As PivotTable
        Dim slc1 As Slicer, slc2 As Slicer
        Dim slcCache1 As SlicerCache, slcCache2 As SlicerCache
        Dim slcItem1 As SlicerItem, slcItem2 As SlicerItem
        
        Set PT1 = Sheets("Data").PivotTables("pvt_RMR_individualScoreCards") '(1)
        Set slc1 = PT1.Slicers("AccountManagerNm__IndividualScore") '(1)
        Set slcCache1 = slc1.SlicerCache
    
    
        
        Set PT2 = Sheets("Data").PivotTables("pvt_NBDayTerr_individualScoreCards") '(2)
        Set slc2 = PT2.Slicers("AccountManagerTerritoryNm_IndividualScore") '(1)
        Set slcCache2 = slc2.SlicerCache
     
        
        'On Error GoTo PT_Error
        
        slcCache2.ClearManualFilter
    
        For Each slcItem1 In slcCache1.SlicerItems
          If slcItem1.Selected Then
             slcCache2.VisibleSlicerItems(slcItem1.Name).Selected = slcItem1.Selected
          End If
        Next slcItem1
    
    'PT_Error:
        'Resume Next
    
    End Sub
    Last edited by martystoked; 10-25-2013 at 07:37 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA Error: Runtime Error 1004: AutoFilter method of Range class failed
    By jl22stac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2013, 07:27 PM
  2. [SOLVED] Range error in code, runs alone but not inside my full program, giving runtime error 1004
    By charizzardd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-23-2012, 03:34 PM
  3. Runtime Error 1004 Question
    By Armored Wing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2011, 01:19 PM
  4. runtime error 3265 error in a VBA Query to pull info from ERP Database
    By NBVC in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-12-2010, 03:59 PM
  5. Excel xmlHTTP object error message - system/runtime error
    By Porky2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2007, 09:36 AM

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