I have a read only 2013 workbook I use as a template tool with a data model going to 4 linked pivot charts with slicer enabled cross filtering. When I select filter options on one slicer that filter out all options with data on another slicer my workbook crashes.
That is to say, slicer 1 has an option A, B, C and so on.
- Option A is related to a subset 1, 2 & 3 on slicer 2.
- Option B is related to a subset 4, 5 & 6 on slicer 2.
If slicer 2 has any data selected and I filter slicer 1 to preclude any portion of that selection my workbook crashes.
Things that didn’t work:
- I have rebuilt the charts, slicers and connections and still get the same issue.
- I built a very simple model in another workbook and could not reproduce the issue.
- I turned off events.
- I commented out my VBA.
If I am careful so select items that share a slicer 1 relationship from slicer 2 things seem to “work” but something is clearly broken here.
This condition seems to only occur when there is no overlap in related subsets to slicer 1 from slicer 2. If option A has a subset 1, 2, 3, 4, 5. . . and option B has a 3, 4, 5 but no 1 or 2 I don’t get the issue, its only when all subsets are unique to the parent and selections don’t overlap (like no 5 in A = crash when 5 is unique to B and A is selected). I couldn’t find any known issues related to this.
Event Viewer shows:
Faulting application name: EXCEL.EXE, version: 15.0.4797.1003, time stamp: 0x56bf05fc
Faulting module name: msolap110_xl.DLL, version: 0.0.0.0, time stamp: 0x55b0c5bf
My questions are:
Could “msolap110_xl.DLL” be the issue or is it more likely part of the symptom?
Have I mishandled the pivot charts, slicers or data model in some way to cause this?
Can it be fixed?
Relevant Programming:
Private Sub myReloadDataModel()
If Range("myHasPath").Value = "True" Then
MsgBox "You need to enter a path to a valid target location.", vbOKOnly, "Bad Path"
Else
myUser = MsgBox("Are you sure you want Reload the Data Model with any csv data located in the target path?", vbOKCancel, "3. Load Data Model")
If myUser = vbOK Then
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Cursor = xlWait
myTime01 = Time
Sheets("Notes").Unprotect
Sheets("2. Get Table").Unprotect
ActiveWorkbook.RefreshAll
' ActiveWorkbook.Model.Refresh
' ActiveWorkbook.Connections("Query - myGetMasterSpan").Refresh
x = ActiveWorkbook.Connections("Query - myGetMasterSpan").ModelTables.Item(1).RecordCount
myTime02 = Time
myTime03 = Format(myTime02 - myTime01, "HH:MM:SS")
Sheets("2. Get Table").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowUsingPivotTables:=True
Application.Cursor = xlDefault
Application.EnableEvents = True
Application.ScreenUpdating = True
MsgBox Format(x, "#,##0") & " Records Loaded!" & vbNewLine _
& vbNewLine _
& "Total Update Time = " & myTime03, , "Update Completed"
End If
End If
End Sub
event
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
On Error Resume Next
Application.ScreenUpdating = Fales
Application.EnableEvents = False
Sheets("2. Get Table").Unprotect
Application.Run "mySlicerMagic"
ActiveWorkbook.Connections("LinkedTable_Table6").Refresh
Set myChart04 = Sheets("Flow Errors").ChartObjects("Chart 4").Chart
myChart04.ChartTitle.Text = Range("myErrorsTitle")
With myChart04.Axes(xlValue)
.MinimumScale = Range("myMin_Scale")
.MaximumScale = Range("myMax_Scale")
End With
Set myChart05 = Sheets("Flow Errors").ChartObjects("Chart 5").Chart
myChart05.ChartTitle.Text = Range("myErrorsTitle")
With myChart05.Axes(xlValue)
.MinimumScale = Range("myMin_Zoom")
.MaximumScale = Range("myMax_Zoom")
End With
Application.Run "myChart5Format"
Set thisPulseChart_02 = Sheets("Pulse Analyzer").ChartObjects("Chart 2").Chart
With thisPulseChart_02
.ChartTitle.Text = "Full Pulse Flow - " & Range("myErrorsTitle")
End With
With thisPulseChart_02.Axes(xlValue)
.MaximumScale = Range("myMax_Scale") + 0.09
End With
Set thisPulseChart_03 = Sheets("Pulse Analyzer").ChartObjects("Chart 3").Chart
With thisPulseChart_03
.ChartTitle.Text = "Raw Pulse Flow by Pulse- " & Range("myErrorsTitle")
End With
Application.Run "myChart3Format"
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
This sub gets the selection range for me
Private Sub mySlicerMagic()
On Error GoTo 100
Set myX = ActiveWorkbook.SlicerCaches("Slicer_Pulse_Set").SlicerCacheLevels(1).SlicerItems
For i = 1 To myX.Count
If myX(i).Selected = True Then
x = x + 1
If x = 1 Then
myItemName01 = myX(i).SourceName
End If
myItemName02 = myX(i).SourceName
End If
Next
Range("myPulseRange")(1, 1) = myItemName01
Range("myPulseRange")(2, 1) = myItemName02
100
End Sub