Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Answers please to my query

I posted this earlier in the day with a different subject
heading (including the word "Pivot Table"). Is "Pivot
Table" a phrase that Excel Programmers choke on? I have
posted several questions over a period of time on Pivot
Tables and none has received any response. Even a
direction as to where I can get help if this list can't
help would be a great help!!!!

Anyhow the real question is:

I wish to copy a pivot table report and name
it "PivotTable_2". How do I do this programmatically? I
tried recording a macro and came up with the following:

ActiveSheet.PivotTables("PivotTable1").PivotSelect "",
xlDataAndLabel
Selection.Copy
Application.Goto Reference:="Target_Region"
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.PivotTables("PivotTable8").Name
= "PivotTable_2"

The problem is that next time I run the procedure the
Pivot Table to be named "PivotTable_2" is "PivotTable9".
How do I get the table to be "PivotTable8" each time? (If
I knew that I wouldn't actually need to rename it
as "PivotTable_2"!).

TIA
Ron


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Answers please to my query

I don't personally use pivot tables much but I just used Ron de Bruin's
google add in
http://www.rondebruin.nl/
available here. I typed in Pivot Table and got more answers than you want.
Try this
http://tinyurl.com/tqqh

"Ron McCormick" wrote in message
...
I posted this earlier in the day with a different subject
heading (including the word "Pivot Table"). Is "Pivot
Table" a phrase that Excel Programmers choke on? I have
posted several questions over a period of time on Pivot
Tables and none has received any response. Even a
direction as to where I can get help if this list can't
help would be a great help!!!!

Anyhow the real question is:

I wish to copy a pivot table report and name
it "PivotTable_2". How do I do this programmatically? I
tried recording a macro and came up with the following:

ActiveSheet.PivotTables("PivotTable1").PivotSelect "",
xlDataAndLabel
Selection.Copy
Application.Goto Reference:="Target_Region"
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.PivotTables("PivotTable8").Name
= "PivotTable_2"

The problem is that next time I run the procedure the
Pivot Table to be named "PivotTable_2" is "PivotTable9".
How do I get the table to be "PivotTable8" each time? (If
I knew that I wouldn't actually need to rename it
as "PivotTable_2"!).

TIA
Ron




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Answers please to my query


hi mccormick.
you should name a pivot table when its first created.
eg:

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
"sheet2dummy!R1C1:R" & rowend & "C" & colend &
"").CreatePivotTable TableDestination:="", TableName:= _
"sheetxpivot", DefaultVersion:=xlPivotTableVersion10









sheetxpivot


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Answers please to my query

See one response at your other post.

Ron McCormick wrote:

I posted this earlier in the day with a different subject
heading (including the word "Pivot Table"). Is "Pivot
Table" a phrase that Excel Programmers choke on? I have
posted several questions over a period of time on Pivot
Tables and none has received any response. Even a
direction as to where I can get help if this list can't
help would be a great help!!!!

Anyhow the real question is:

I wish to copy a pivot table report and name
it "PivotTable_2". How do I do this programmatically? I
tried recording a macro and came up with the following:

ActiveSheet.PivotTables("PivotTable1").PivotSelect "",
xlDataAndLabel
Selection.Copy
Application.Goto Reference:="Target_Region"
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.PivotTables("PivotTable8").Name
= "PivotTable_2"

The problem is that next time I run the procedure the
Pivot Table to be named "PivotTable_2" is "PivotTable9".
How do I get the table to be "PivotTable8" each time? (If
I knew that I wouldn't actually need to rename it
as "PivotTable_2"!).

TIA
Ron


--

Dave Peterson

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
Sum of yes answers Linda L Excel Worksheet Functions 2 December 23rd 09 06:04 PM
how to get the answers from 3 conditions Chiran Excel Worksheet Functions 8 July 17th 08 04:49 PM
Please help me with answers Michael Wiredu Excel Discussion (Misc queries) 2 August 24th 06 05:39 PM
using formula with several possible answers jog398 Excel Worksheet Functions 3 May 19th 06 02:39 AM
Does anyone know the answers to DK Links and Linking in Excel 0 May 23rd 05 11:14 PM


All times are GMT +1. The time now is 07:58 PM.

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"