Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Printing a Pivot Table from code - Excel 2003

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   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default Printing a Pivot Table from code - Excel 2003

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   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Printing a Pivot Table from code - Excel 2003

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   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default Printing a Pivot Table from code - Excel 2003

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   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Printing a Pivot Table from code - Excel 2003

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing a table on excel 2003 a-you Excel Discussion (Misc queries) 1 January 15th 08 06:15 PM
Excel Pivot Table VB Code carolini Excel Discussion (Misc queries) 1 February 6th 06 09:33 PM
problems with printing format for excel table in Publisher 2003 Kris J. Excel Discussion (Misc queries) 2 June 13th 05 08:14 PM
Can links between Excel 2003 Pivot Charts and their pivot table b. Mark Allen Charts and Charting in Excel 2 March 5th 05 05:24 PM
Printing a Pivot Table from code - Excel 2003 Newbie Excel Discussion (Misc queries) 4 January 5th 05 04:10 PM


All times are GMT +1. The time now is 11:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"