Overview:
I have a pivottable with filter. The filter contains a list from 1 to 30, each of which must be printed separately. That is, each time I have to change the filter and print the filtered result.
My demand:
What I want is to print all of them at once.
Conditions:
The list of numbers is not continous or static. It means that some numbers are droped and some new numbers may be added later.
My Current Situation and Challange:
By means of macro recorder command, I could arrive up to the following situation. But the problem is that, I don't know how to make it dynamic. I mean, how to say "do the procedure for the existing numbers".
Can anyone help me please to correct and complete the following macro?
Thanks,
Dio
I have a pivottable with filter. The filter contains a list from 1 to 30, each of which must be printed separately. That is, each time I have to change the filter and print the filtered result.
My demand:
What I want is to print all of them at once.
Conditions:
The list of numbers is not continous or static. It means that some numbers are droped and some new numbers may be added later.
My Current Situation and Challange:
By means of macro recorder command, I could arrive up to the following situation. But the problem is that, I don't know how to make it dynamic. I mean, how to say "do the procedure for the existing numbers".
Can anyone help me please to correct and complete the following macro?
Code:
Sub Makro1()
'
' Makro1 Makro
'
ActiveSheet.PivotTables("Leistungsnachweise").PivotFields("Tour").CurrentPage _ = "1"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _ IgnorePrintAreas:=False
ActiveSheet.PivotTables("Leistungsnachweise").PivotFields("Tour").CurrentPage _ = "2"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _ IgnorePrintAreas:=False
End Sub
Thanks,
Dio