bobhasnoidea
New Member
- Joined
- Apr 9, 2019
- Messages
- 8
Hi there, I'm a complete VBA novice, but have sorted out a macro that selects three different worksheets and creates a PDF of those three sheets and the Pivotcharts within them.
What I would like, is for the output file name to be a concatenate of the two active slicers so I can select the options I want on my slicers and then run my Macro to create the PDF and now what the PDF actual contains.
Is this achievable?
Can anyone provide any pointers?
Sub Scheme_YEAR()
Dim myPath As String
Dim FolderPath As String
FolderPath = Application.ActiveWorkbook.Path
myPath = Application.ActiveWorkbook.FullName
On Error Resume Next
MkDir FolderName
On Error GoTo 0
Sheets(Array("Scheme Specific by Root Cause", "Scheme Specific Annual Root")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=FolderPath & "\Close Call - Scheme Specific Year to Date", _
openafterpublish:=False, ignoreprintareas:=False
MsgBox "Report successfully created."
Sheets("Step 2 - Data Entry and Reports").Select
End Sub
So far so good.
What I would like, is for the output file name to be a concatenate of the two active slicers so I can select the options I want on my slicers and then run my Macro to create the PDF and now what the PDF actual contains.
Is this achievable?
Can anyone provide any pointers?