Hi,
Problem: Is there any solution how I can automize creating pdf prints of all of the slicer items within a pivotchart?
Current as is: I have 6 pivotgraphs that I control with my slicer.
I hope that my question is clear...
Cheer, Jeroen
Hi,
Problem: Is there any solution how I can automize creating pdf prints of all of the slicer items within a pivotchart?
Current as is: I have 6 pivotgraphs that I control with my slicer.
I hope that my question is clear...
Cheer, Jeroen
This is what I have got so far, however excel gives me an error message on the row: "Call saveaspdf(1)...The error message is: "compile error...Wrong number of arguments or invalid property assignment...
Can someone help me?
PHP Code:
Sub Step_Thru_SlicerItems()
Dim slItem As SlicerItem
Dim i As Long
Application.ScreenUpdating = False
With ActiveWorkbook.SlicerCaches("Slicer_Store")
.SlicerItems(1).Selected = True
For Each slItem In .VisibleSlicerItems
If slItem.Name <> .SlicerItems(1).Name Then _
slItem.Selected = False
Next slItem
Call saveaspdf(1)
For i = 2 To .SlicerItems.Count
.SlicerItems(i).Selected = True
.SlicerItems(i - 1).Selected = False
Call saveaspdf(i)
Next i
End With
Application.ScreenUpdating = True
End Sub
Sub saveaspdf()
Dim rngRange As Range
Set rngRange = Worksheets("Pivot Graphs").Range("B2")
Sheets("Pivot graphs").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"\\vmware-host\Shared Folders\Desktop\Sales booster dashboard\Dashboard per winkel\" & rngRange & ".pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks