Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Pivot Table Data format

I have a Pivot Table and of course when I double Click one of the
totals it fires up a new worksheet with my data. I have a Macro that
formats the worksheet the way I want it to look for printing. Is the a
way to fire up the macro when I double click one of the totals.


Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Pivot Table Data format

You could add code to the ThisWorkbook module, that will run when a new
sheet is added to the workbook. Check the first cell in the new sheet,
to see if it matches the first cell in the source data table.

For example, if the source data has Date as the first heading, this will
run a macro named FormatSheet:

Private Sub Workbook_NewSheet(ByVal Sh As Object)
If Sh.Cells(1, 1).Value = "Date" Then
FormatSheet
End If

End Sub


Little Penny wrote:
I have a Pivot Table and of course when I double Click one of the
totals it fires up a new worksheet with my data. I have a Macro that
formats the worksheet the way I want it to look for printing. Is the a
way to fire up the macro when I double click one of the totals.


Thanks for your help



--
Debra Dalgleish
Contextures
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
In Office 07, how do I format my pivot table data? Razzberryzing Excel Worksheet Functions 1 September 7th 09 01:22 AM
Pivot Table Format from Source Data tommcbrny Excel Discussion (Misc queries) 0 February 6th 09 08:12 PM
Format Extracted Data from Pivot Table Martincito23 Excel Discussion (Misc queries) 2 October 26th 07 01:01 PM
Pivot Table format changes when data is refreshed Bendinblues Excel Discussion (Misc queries) 8 October 22nd 07 02:45 PM
how do I format data into columns using a pivot table report? snd Excel Discussion (Misc queries) 1 April 24th 06 09:01 PM


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

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

About Us

"It's about Microsoft Excel"