Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Table Page Field | Excel Discussion (Misc queries) | |||
Page field - pivot table | Excel Discussion (Misc queries) | |||
Controlling Pivot Table Page-Field | Excel Discussion (Misc queries) | |||
Pivot Table Page Field | Excel Discussion (Misc queries) | |||
Pivot Table Page Field | Excel Discussion (Misc queries) |