![]() |
Pivot Table Page Field
Hey Guys
I have a pivot table and it has 1 page field called "Supervisor". There may be 5 or 20 or any number of values in this pagefield. I would like to be able to have code select each item available in that particular page field and run the following code after it makes each new selection: Dim RngCounter As Long RngCounter = Application.WorksheetFunction.CountA (Worksheets("Wkly Renewals").Range("D:D")) With CreateObject("Wscript.Shell") .Popup "The name of the active printer is " & Application.ActivePrinter _ , 1, "Print Confirmation", 64 End With Worksheets("Wkly Renewals").Range("D7:F" & RngCounter + 2).PrintOut Is this possible to have it loop through and do this? Thank you Todd Huttenstine |
Pivot Table Page Field
Just loop through the pivot items of the pagefield. Set the page field to
each pivot item If you need sample code, check this out: http://groups.google.com/advanced_group_search?hl=en -- Regards, Tom Ogilvy "Todd Huttenstine" wrote in message ... Hey Guys I have a pivot table and it has 1 page field called "Supervisor". There may be 5 or 20 or any number of values in this pagefield. I would like to be able to have code select each item available in that particular page field and run the following code after it makes each new selection: Dim RngCounter As Long RngCounter = Application.WorksheetFunction.CountA (Worksheets("Wkly Renewals").Range("D:D")) With CreateObject("Wscript.Shell") .Popup "The name of the active printer is " & Application.ActivePrinter _ , 1, "Print Confirmation", 64 End With Worksheets("Wkly Renewals").Range("D7:F" & RngCounter + 2).PrintOut Is this possible to have it loop through and do this? Thank you Todd Huttenstine |
Pivot Table Page Field
Thanks
Todd -----Original Message----- Just loop through the pivot items of the pagefield. Set the page field to each pivot item If you need sample code, check this out: http://groups.google.com/advanced_group_search?hl=en -- Regards, Tom Ogilvy "Todd Huttenstine" wrote in message ... Hey Guys I have a pivot table and it has 1 page field called "Supervisor". There may be 5 or 20 or any number of values in this pagefield. I would like to be able to have code select each item available in that particular page field and run the following code after it makes each new selection: Dim RngCounter As Long RngCounter = Application.WorksheetFunction.CountA (Worksheets("Wkly Renewals").Range("D:D")) With CreateObject("Wscript.Shell") .Popup "The name of the active printer is " & Application.ActivePrinter _ , 1, "Print Confirmation", 64 End With Worksheets("Wkly Renewals").Range("D7:F" & RngCounter + 2).PrintOut Is this possible to have it loop through and do this? Thank you Todd Huttenstine . |
All times are GMT +1. The time now is 02:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com