Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi,
I have a pivot table that constantly changes based on what the user chooses to analyse. I want the user to be able to print the pivot table at the click of a button with having to keep setting the print area. Is there a way to do this programmatically If yes, how? Thanks |
#2
![]() |
|||
|
|||
![]()
You shouldn't have to set a print area. If the pivot table is the only
thing on the worksheet, only the pivot table range will print. Newbie wrote: Hi, I have a pivot table that constantly changes based on what the user chooses to analyse. I want the user to be able to print the pivot table at the click of a button with having to keep setting the print area. Is there a way to do this programmatically If yes, how? Thanks -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#3
![]() |
|||
|
|||
![]()
Thanks but there are other things on the worksheet . . . . any other ideas?
"Debra Dalgleish" wrote in message ... You shouldn't have to set a print area. If the pivot table is the only thing on the worksheet, only the pivot table range will print. Newbie wrote: Hi, I have a pivot table that constantly changes based on what the user chooses to analyse. I want the user to be able to print the pivot table at the click of a button with having to keep setting the print area. Is there a way to do this programmatically If yes, how? Thanks -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#4
![]() |
|||
|
|||
![]()
You could use the TableRange2 property to create an address for the
print area. For example: '============================== Dim ws As Worksheet Dim rngPT As Range Dim strPT As String Set ws = ActiveSheet Set rngPT = ws.PivotTables(1).TableRange2 strPT = rngPT.Address ws.PageSetup.PrintArea = strPT '===================== Newbie wrote: Thanks but there are other things on the worksheet . . . . any other ideas? "Debra Dalgleish" wrote in message ... You shouldn't have to set a print area. If the pivot table is the only thing on the worksheet, only the pivot table range will print. Newbie wrote: Hi, I have a pivot table that constantly changes based on what the user chooses to analyse. I want the user to be able to print the pivot table at the click of a button with having to keep setting the print area. Is there a way to do this programmatically If yes, how? Thanks -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#5
![]() |
|||
|
|||
![]()
Thanks I'll give it a go
"Debra Dalgleish" wrote in message ... You could use the TableRange2 property to create an address for the print area. For example: '============================== Dim ws As Worksheet Dim rngPT As Range Dim strPT As String Set ws = ActiveSheet Set rngPT = ws.PivotTables(1).TableRange2 strPT = rngPT.Address ws.PageSetup.PrintArea = strPT '===================== Newbie wrote: Thanks but there are other things on the worksheet . . . . any other ideas? "Debra Dalgleish" wrote in message ... You shouldn't have to set a print area. If the pivot table is the only thing on the worksheet, only the pivot table range will print. Newbie wrote: Hi, I have a pivot table that constantly changes based on what the user chooses to analyse. I want the user to be able to print the pivot table at the click of a button with having to keep setting the print area. Is there a way to do this programmatically If yes, how? Thanks -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can a workbook with macros created in excel 2003 work in excel 20. | Excel Discussion (Misc queries) | |||
Excel 2000 file when opened in Excel 2003 generates errors? | Excel Discussion (Misc queries) | |||
pivot table multi line chart | Charts and Charting in Excel | |||
convert excel list to pivot table | Excel Discussion (Misc queries) | |||
In excel and a pivot table - how can I stop it displaying (blank). | Excel Discussion (Misc queries) |